There are many ways to go about it. I have experience in aviation, so I went to the FAA website and found everything I needed. I also used some YouTube free resources. I did it for free, using publicly available resources.
If you have no aviation experience at all, it will take a little more effort. I would start by watching this video to get a feel for what it is you will need to know.;
Also you can see what the test will look like on 3DR's site
https://3dr.com/faa/drone-practice-tests/
If you like and at least generally understand what you are seeing in these resources, you may well be a candidate to learn on your own and save some money. If this looks like learning a foreign language for you, perhaps a class would be appropriate for you..
So getting back to your original question. You study up, and then register and take the test. Once you pass the test you go into the FAA website and apply for a license. It is all on line.
When you get your license you will get a number to put on your drone (like a tail number on a airplane) and you are pretty much good to go.