Some people are basically recommended/required to take summer classes (athletes on a 4-5-1 schedule or people who fail classes), and then there are a limited number of slots for cadets who want to apply for summer classes to get ahead in school or get a difficult class out of the way (thinking of firsties in my squad who took Aero over the summer.) These are harder to get, but you'll just apply for them like other summer programs.
For freshmen- If you're assigned academics during the summer, you'll take your class in lieu of airnmanship. If you want to do airmanship and school over the first summer, you have to give up your leave because of the ESET requirement. If you choose to take a class, normally you give up leave as well.
I honestly don't know how grade replacement works.