It was pretty simple: (1) study until you know the material inside and out, (2) find a nearby testing center, (3) schedule/pay for your test, and (4) go for it! There's a little bit of FAA registration that you have to do. Here is a more detailed explanation of how to go about getting it:
Ultimate Drone License Guide from Lawyer&Commercial Pilot (2018)
There are tons of great resources available online for free. You don't need to pay for a study course (I passed with a 93% using just free material online).
This video from Northrup was my favorite resource, but there are other great resources like
this at-a-glance "cheat sheet", and
these practice tests.
Good luck! It's a great thing to do. After studying for and passing my test, I feel significantly more confident about flying having a better understanding of aviation in general, how my drone fits into it all, and how to stay safe and legal.