Each state, and in some cases, city, has it's own requirements which can vary from one end of the spectrum to the other. Some rural areas have no requirements for licensure while others are so stringent, only the chosen few get licenses. The latter is the exception rather than the rule. Typically, states have a few classes of licenses ranging from journeyman, limited energy, and master. The master being the license that allows you to pull permits.
This is a broad overview and as I said, each state is different. Some states don't have a statewide license and contractors are licensed by city. Mike Holt has a great reference
HERE that links to the various agencies that administer licenses. It might not be completely up to date, but it's a great starting point.