For enlisting, you'll need to take the ASVAB. It's a single test.
For commissioning as an officer, it's going to take more. Each branch has their own officer qualifying test that varies in content. For example, the Army test probably won't have the same subsections that the Air Force does (AF has a few aircraft-specific subests).
As a potential officer, you'll also be evaluated on your current ability to lead, as well as potential to lead. Depending on what job you get as an officer, you'll be forced to make immediate, difficult decisions in a time constrained environment, with only 80% of the information available to you. You need to be prepared to sometimes have those decisions not work out. People can and will die no matter what decision you make, sometimes you have to select from a course of options that are all poor. You also need to be able to be given somewhat vague directions, and be able to determine what effect is being desired, and then working with your team to execute the requirement.
As an enlisted person, you'll essentially be following orders given by officers and noncommissioned officers. Enlisted people have very technical skills. That doesn't mean that you'll be "mindlessly following orders"; American doctrine towards its enlisted personnel dictates autonomy and independent decision-making in the event the chain of command is disrupted. So, as a new guy, you'll be learning your job and following orders from noncommissioned officers, who in turn are following commands from officers, who were following commands from their commanders, who were given strategic goals from THEIR commanders (think 1-4 star generals), who were given THEIR orders from the President of the United States. As you learn your job and excel at it, you'll be expected to fulfill a leadership position and lead those who are new to the job.
Leadership and followership is emphasized for both enlisted and commissioned military members. This creates a decentralized command structure where units can operate and still be effective in the event of lost communications with leadership, regardless of the cause of that lost communication.
The pay is shit and the hours are long, there isn't much prestige when you're in a military town and every other single guy is also in the military. I suggest finding out what benefits are good for you and starting there. Each branch also has its own positives and negatives:
Certain jobs tend to attract certain personality types, and then shape them further.
Army - Pretty cool operations. However, most Army personnel are... not the brightest. Duty locations suck, you'll likely be stationed in the middle of nowhere, with the dating options that come with that.
Air Force - Some jobs are cool, some are dorky and boring. Air Force personnel tend to be more nerdy/arrogant, but still have their fair share of not so bright people. Duty locations vary; some are great, some are in the middle of nowhere.
Navy - Great duty stations in major port cities, for the most part. However, them being Navy towns, you're just another dumbass Navy guy according to the local population of women. Any negative interaction with a Navy guy a woman has, will be stereotyped to you. Not difficult to stand out though, since most Navy dudes (and military guys in general) tend to have a herd mentality.
Marines - Similar duty stations as the Navy. Heavy indoctrination into their combat culture. Similar to Navy. Marines have a reputation, better to be an officer in this branch.
Coast Guard - lol
Space Force - lmao
Great options to get some kind of technical certification and then make triple your salary as a civilian contractor afterwards (this applies to a lot of technical military jobs across all branches). Many jobs don't allow for this opportunity, so choose carefully.