Finland is part of the European Union and Schengen area. If you travel to Finland from a non-Schengen country, you must go through the border control before entering the country. Also, if you travel from Finland to a non-Schengen country, you must go through border control before boarding the airplane. The border checks and immigration processes take place at the airport.
Helsinki Airport is a significant transfer airport. The whole airport is built under one roof, which makes transferring at Helsinki Airport easy. If you arrive from a non-Schengen country, and you change planes at Helsinki Airport to continue your journey to other parts of Europe, the border control will take place at Helsinki Airport.