In the USA, AP courses helps with college in two main ways.
- AP classes look really good on college applications. Generally speaking, taking AP classes will make you a better candidate if you do well in the classes. If you want to get into a very competitive school (e.g. Harvard or MIT), you must take as many AP classes as possible and you must do very well in them. Getting a C in an AP class will hurt you as an applicant, especially when applying to a competitive program.
- While in college, having AP credits can exempt you from general education classes. These are classes that everyone has to take regardless of their major. For example, even if you are majoring in music, you still have to take a math and a science class to graduate. Depending on the school's policy, you can get transfer credits for AP classes. Typically, if you do well enough on an AP exam, you will get transfer credit for the school's equivalent of that class. This means that you do not have to take that class, which can help you graduate early, add a minor or second major, and generally frees up space in your schedule.
Technically, general education courses are supposed to expose you to a wide variety of topics and fields, which is great if you are unsure what you want to major in. Practically, general education courses act as GPA "padding," which means you get an A for doing the bare minimum and this good grade offsets poor grades you may get in difficult courses. Luckily, most schools will stop you from taking general education classes even if you have AP transfer credits.