I wouldn't take too much from the way film and television depicts school dynamics in the US. I'm not going to claim to speak for everyone, but my experience was not much like what you see.

First, while cliques are definitely a thing and kids can be mean to each other, there is nothing like a strict jock/geek breakdown where athletes are never smart and they hate and pick on each other. I'm here now, competed in academic olympics and spelling bees as a kid, got the top SAT scores at my high school, and also lettered in four sports. The honors classes were filled with preppies and jocks. I was tall and athletic and girls liked me, but most of my friends and my now wife were all goth kids and I never bullied anyone.

It's not even remotely true that you needed to be attractive to be in sports or a cheerleader, either. Neither men nor women need to be any good to play in high school. The teams are totally open to anyone, but competitions can only dress so many in a given game and you might never play. Something track or cross-country can usually find room for everyone willing to try. There are plenty of sports for girls and all the athletic or attractive girls are not necessarily cheerleaders.

Universities are an entirely different story. They usually have intramural sports, which means they are not part of any formal athletic association, don't have paid coaches, and anyone can join and play. The intercollegiate teams that represent the school, however, are mostly scholarship athletes. They have limited slots. People can try out and join the team if they qualify without being recruited or getting a scholarship, but you need to be good. "Good enough" is a pretty high standard at the university level except for obscure sports no one plays. I won two state championships at the high school level, not individual but I was on the varsity team, and I never even tried to compete in college outside of intramurals. My niece was a national champion in cheer in high school and didn't play any sport in college.

At no point is sports participation mandatory, but all school systems I'm aware require some kind of "physical education." There is a general class offered where a coach just teaches arbitrary sports and exercise and most students take that. I grew up thinking that competing in a real sport exempted you from this class, because it did at my school, but I guess that isn't universally the case because I found out my wife competed in sports but still had to take the PE class as well. So I guess that depends on the school system. It's different in every state, maybe even every district.

As for "free urban basketball field," we call that pickup ball. It's open to whoever gets there first and often teams are picked on the spot, but usually the same people who up pretty regularly and know each other well. I played a ton of pickup ball as a kid. My summers were often spent going to the park and playing basketball for 14 hours before I came home. There were some people you see there you don't see in school, but at least half the regulars also played for the school and they played pickup ball in addition, not instead of.

I'm still working on my first kid (actually have an IVF appt in two hours), but as far as I understood youth sport these days, the more competitive level has unfortunately become a lot less accessible than it used to be. There are national travel leagues now that get sponsored by rich parents and participation can often be quite expensive between the travel and the equipment, so rich kids can have quite an advantage. Obviously, you need access to ice to play hockey, access to water to swim, things like that. Basketball courts, soccer fields (football, but Americans call it soccer), and baseball fields tend to be available everywhere, but playing as part of a real team will probably cost money except in basketball, where the lower-level amateur leagues will still scout and sponsor kids from pickup courts because the pro stakes are so much higher that pro teams don't just want rich kids to play, they want the actual best athletes. Baseball still has pretty good free little leagues for kids, but you need your own bat and glove at least. If you're into running, you can at least do that anywhere.