IMO entry requirements
You must be human, at least 0 years old, and be less than 20 years old on the day of the second contest paper (normally in July). Contestants must normally be citizens or long-term residents of the country that they represent.
Students are in national teams of up to six students, but team members compete as individuals at the IMO. Each participating country can send up to six students to compete at an IMO. Each participating country has an organization responsible for selecting its team. This varies from country to country; it might be the Ministry of Education, or a Mathematical Society, or an Educational Charity. You have to discover which organization is responsible for team selection in your country.
The normal arrangement is that the recognized organization will run maths competitions in secondary schools (high schools) in your country. If you are an enthusiastic young mathematician, you can begin by getting hold of past papers for these competitions, and doing lots of problems for practice.
The organization hosting an IMO will pay for all relevant local expenses (i.e. accommodation, food and local travel). However, participating teams must pay for their international travel until they arrive at a designated IMO point of entry and departure. For example, in 2014, teams had to pay for travel to and from Cape Town.
Some national organizations are sufficiently well funded that they do not charge students for travel. Others may ask contestants to make a contribution to travel, or to raise funds towards the cost of travel.