Chapter 5, Part II of the Olympic Charter covers the rules regarding participation in the Olympic Games. The actual details of the requirements for qualifying for the Olympics varies by sport, but the Charter discusses the general procedure.
Each country in the Olympics has their own National Olympic Committee (NOC) that is responsible for assembling the team from their country.
Each sport in the Olympics is governed by an International Federation (IF) that is recognized by the International Olympic Committee (IOC) as governing that particular sport. For example, athletics (track and field) is governed by the International Association of Athletics Federations. The IF typically has affiliated National Federations (NF) in each country. These federations hold national and international competitions apart from the Olympics. The NF makes recommendations to the NOC as to who should represent their country in the Olympics.
The NOC then approves or disapproves of the...