It has been a while since I did all this, but you solo before you get a license, because it is part of your training.
You must pass/certify a medical certificate before solo, but you're a long ways from a license. There's also a written test, but as I recall, that's not needed before solo, just before license
You usually have a few hours of flying with your instructor, getting "dual" instruction. In the conventional little plane layout, the instructor sits right, in the 'copilot' seat, and you sit left, in the 'pilot in command' seat.
When he/she deems you ready, maybe after 10 hours of dual (7 for me) you get to fly around the pattern, and do a couple of takeoffs and landings, often called 'touch and goes'. Or as the Brits say, 'bumps and circuits'.
After that, the next 30 hours or so (for a private pilot) are building on basic skills, preparing to go cross-country, etc. Dual instruction for each phase, followed by solo.
At a minimum of 40 hours 20 dual/20 solo, your instructor will sign your logbook as ready to test, and an FAA designated examiner will give you a check ride. Pass it, and you get a license.
A license is required before you can legally carry passengers. Additional certifications are needed to fly in instrument conditions, or be paid to fly, or have more than one engine, retractable gear, etc. Usually takes a few hours of instruction in any different plane to be 'checked out', and at the higher performance planes like the Lear, you need a Type Rating.