Often times, “school life” related anime have students wearing uniforms. These uniforms can be very iconic for an anime series, and are often used for cosplay.
So, is it actually typical in Japan for people to wear uniforms? Yes. Starting from junior-high, it is very typical that students wear school uniforms, and schools that do not have uniforms are seen as being liberal. The focus many times is on the uniform itself, but it is also typical that the color of socks, shoes, and the color of your hair is pretty strictly regulated (surprise! no, there are not students with green and pink hair in a typical classroom).
The typical types of school uniforms for girls are “Sailor (セーラー服)” and “blazer (ブレザー)”. Sailor are a combination of skirts and tops which have a distinguished collar that resembles clothes that sailors used to wear back in the days. They are harder to spot now (especially in Tokyo), but yes people actually do wear them.
The typical types for guys are “Gakuran (学ラン)” and “blazer (ブレザー)”. Gakuran is considered formalwear for male students and is a single piece suit on the top with buttons that go up all the way to the neck.
They also tend to come with white plastic collars that make the collar stand perfectly straight. The cool kids would take the plastic collars and open the front buttons and would get scolded by the teachers to button up all the way.
The uniform culture is pretty embedded in school culture here, and some people can choose schools because they think the uniform is kawaii.
In the early to mid 90s, there were “yankees” or basically delinquent kids who would customize their uniforms such as heavy embroidery on the inside of their Gakuran. While there were strict rules, people tried to break them and stand out, but not really breaking the rules as they still wore the uniform.