Title IX of the Education Amendments Act of 1972 had a seismic impact on sports in the United States, but the law itself is only 37 words long: “No person in the United States shall, on the basis of sex, be excluded from participation in, be denied the benefits of, or be subjected to discrimination under any educational program or activity receiving Federal financial assistance.”
The law applies to educational institutions that receive federal funds, including private schools if they accept any federal dollars from student loan, grant or research programs. The courts have repeatedly interpreted the "educational program or activity" section of the law to cover both academics and athletics.
Title IX was written to open opportunities for women in higher education, but it also applies to elementary, middle and high schools that receive public dollars.
The penalty for non-compliance is withdrawal of federal funds, but that's a penalty that has yet to be used. Instead, the U.S. Department of Education Office for Civil Rights, the agency in charge of investigating Title IX complaints and enforcing the law, works with schools to remedy complaints.
Title IX covers three general areas in athletic programs: The opportunity to participate in sports; the opportunity to access athletic scholarships, and the opportunity to access a host of other resources such as locker rooms, training facilities and prime times for game and practice schedules.
The law doesn't require schools to create mirror images of sports programs for males and females. Title IX compliance is assessed through a broader view of the total athletic program opportunities offered to male and female athletes.
For example, schools that fail to offer an equal number of athletic participation opportunities to men and women may still be in compliance with the law if they can demonstrate that they've consistently expanded those opportunities over time. The courts have ruled that "boys are more interested in sports than girls" cannot be used as a defense for failing to offer equal access to participation.