There are different ways a college admits students.
Some admit by major, for e.g., if you applied for Computer Science at NJIT and get accepted, it will say - admitted for Bachelor of Science in Computer Science (B.S) program.
Some colleges admit by school within the university, e.g., Penn State will admit you in College of Engineering with intended major of Computer Science. Some schools admit you to a pre major like Pre-Business instead of directly to Business. For e.g., Indiana Bloomington Kelley school of business will admit you to Pre-Business and if you have a certain GPA/SAT/ACT scores you will be a direct admit to Kelley. If not, you have to work towards it, in your first year at the university. Any time you are admitted to a school (but not to a major directly), you will have to complete some courses in the college and then declare your major.
Most Liberal Art Colleges (LACs) and IVYs will admit you to the college and not to a major and let you explore a bit before declaring a major. This does not mean that you need to apply to that major, you just need to declare it.
Sometimes a particular major is “impacted” or “limited”, which means there are more students wanting to enroll than they have seats.
In such cases, you have to apply to that major in your second semester or second year at that university and that process can be competitive. This is true particularly for popular majors like Computer Science. If your major choice is a popular one like CS, make sure to have enough safety/target colleges, which will admit you directly to CS or they easily let you declare it later once you enroll.
If you clearly know what major you want to pursue, take courses and do activities/work related to that major. Your course work and activities should align with your major.
Some students are undecided and plan to write undecided in their application. Many liberal arts colleges don't mind that and will give you a complete consideration. But some colleges may mandate a major (even if you change it later).
Do not try to get admitted to a college by choosing a less competitive major and think you can change to intended more competitive major once admitted, it’s a gamble. Admission Officers can figure out your intended major based on your courses and activities, if they see that the major you mentioned on the application does not go well with what you have done until now, it can lead to denial.
Your choice of major is integral part of your application process. Even when an Ivy school admits you, and lets you declare your major easily later on, they will evaluate your application based on your intended major. They want to see how suited you are for that major, and they look for evidence for that in your application. We talked about the application theme before. Make sure your major aligns well with your theme. When you apply, you will have to weave in enough evidence for your major through different parts of your application. The evidence can be in the form of
Academic courses you have taken. Try to take the highest level of courses available to you in your high school that are related to your major. For e.g. If you are applying to USC Viterbi school of engineering, they want you to have completed at least one Calculus course (it can be in senior year) and they specifically say that pre-calculus is not calculus. Even though Georgia Tech does not officially say this, but they ideally want to see “AP Physics C” course taken by the students applying to a STEM major.
High scores in the AP exams for subjects related to your major.
High scores on the section of SAT or ACT related to your major.
Ask the teacher that taught you those subjects for Letter of Recommendation.
Highlight activities that line up with your major.
A job or volunteer activity in the related field.
Any academic competitions, awards, research done in the intended field.
Many colleges have supplemental essays like “Why Us” or “Why this major”. You can show your interest there. You can talk about it in your interview (If you have one).
Make sure the “future plans section” in the common app matches with college specific major.
Even if you are “undecided” or really not sure which major you want to pursue, you can still try to match a major that a college offers with your coursework, activities, talents, hobbies.
You can always change a major later in college to the extent the college allows it. Some colleges might allow you to change to any major, others might let you change to a major within the school or program like choosing a different branch of engineering. It can be easier to change from engineering school to arts and sciences but not as easy to do other way around.