Log in to contractors-license.org. This offers a comprehensive list of the states and the contact information for the department handling contracting licenses in that state.
Click on the state where you are having the work done. This will lead you to the contact information site.
Locate the link labeled "to find out if a contractor is licensed" and click on the link. This navigates you to the page where you can enter the information you have on the contractor in order to verify the person's license.
Fill out the appropriate information. Some states have links in which you can enter the contractor ID and it will give you the name. Others have fill-in-the-blank forms usually requiring only a name so you can verify the number.
Check the information from the site against the information given to you by the contractor.