In most cases, you'll go through customs and immigration after your flight first arrives in a new country, but there are exceptions. For example, some countries have mutual agreements intended to help speed travelers through the process, so you may go through customs and immigration before you board.