Port of entry

In general, a port of entry (POE) is a place where one may lawfully enter a country. It typically has border security staff and facilities to check passports and visas, and inspect luggage to assure that contraband is not imported. International airports are usually ports of entry, as are road and rail crossings on a land border. Seaports can be used as ports of entry only if a dedicated customs presence is posted there. The choice of whether to become a port of entry is up to the civil authority controlling the port.
Airport of entry.
An airport of entry (AOE) is an airport that provides customs and immigration services for incoming flights. These services allow the airport to serve as an initial port of entry for foreign visitors arriving in a country.
Terminology.
The word "international" in an airport's name usually means that it is an airport of entry, but many airports of entry do not use it. Airports of entry can range from large urban airports with heavy scheduled passenger service, like John F. Kennedy International Airport, to small rural airports serving general aviation exclusively. Often, smaller airports of entry are located near an existing port of entry such as a bridge or seaport.
On the other hand, however, some "former" airports of entry chose to leave their name with the word "international" in it, even though they no longer serve international flights. One example is Osaka International Airport. Even when it had ended all international services and became a purely domestic airport after the opening of Kansai International Airport in 1994, it kept its original name of "Osaka International Airport". Many airports in the nearby region have the same situation, like Taipei Songshan Airport. Songshan retained its official Chinese name, Taipei International Airport, after Chiang Kai-shek International Airport (now Taiwan Taoyuan International Airport) opened. Similar cases of transitions of international airports such as Seoul, Tokyo, Nagoya, Shanghai, Hong Kong, Bangkok, Tehran, etc.
For the European Union, flights between countries in the Schengen Area are considered domestic regarding passport and immigration check. Several international airports have only intra Schengen-flights. Several of these have occasional charter flights to foreign countries.
Stateless persons.
Some cases of statelessness have occurred in airports of entry forcing people to live in the airport for an extended period. One of the most famous cases was that of Mehran Karimi Nasseri, an Iranian national who lived in the Charles de Gaulle Airport in France for approximately eighteen years after being denied entry into France and not having a country of origin to be returned to due to claiming his Iranian nationality had been revoked. Nasseri's experience was loosely adapted by two films, the 1993 film "Tombés du ciel" and the 2004 film "The Terminal". Zahra Kamalfar, an Iranian national who attempted to travel to Canada via Russia and Germany using forged documents, lived in the Sheremetyevo International Airport in Russia for eleven months before being granted refugee status by Canada to reunite with her family in Vancouver.
In the United States.
The formal definition of a port of entry in the United States is something entirely different. According to the Code of Federal Regulations, "the terms 'port' and 'port of entry' incorporate the geographical area under the jurisdiction of a port director." In other words, a port of entry may encompass an area that includes several border crossings, as well as some air and sea ports. This also means that not every border crossing is a port of entry. There are two reasons for this: 
Variations.
In some countries, immigration procedures are carried out by the armed forces rather than specific immigration officers. However, in most, the levying of duty on imports is still carried out by customs officers. Immigration clearance in some ports of entry have automated sections open to the country's own residents or citizens, such as the E-Channel found in Hong Kong and Macau, and Global Entry found at some airports in the United States.
On some international borders, the concept of a port of entry does not exist. Travelers may cross the border wherever and whenever convenient, for example within the Schengen Area. In some cases this may be restricted to citizens of specific countries and to travelers who are not carrying goods over the customs limits; others may only cross the border at a designated border crossing during its opening times.