Drivers License, State ID
A Drivers License is a card which allows you to operate a motor vehicle legally. A drivers license is issued by the state in which you live but allows you to drive anywhere in the United States and Canada. A drivers license is also the major form of official identification in the USA.
If you are only visiting America you can still drive in the US using your home country Drivers License. It is valid in the US up to 6 months. However if you plan to stay in the US for a longer time in order to drive you will need to get a US Drivers License, which requires a Social Security Number.
If you don't have a SSN you can still make an ID Card. For people who can't or don't want to drive, or visitors who don't have a SSN, the Department of Motor Vehicles (DMV) or similar state agency will make a picture identification (ID) card for a small fee. The fee is usually about $15. This ID card called also State ID is usually identical to a Drivers License, but it does not allow you to drive.
Just as a remark, a few years ago anyone could obtain a State ID or even a Drivers License easily even without a social security number. All you had to do was to go to a DMV office with your passport and in about 10 minutes you had your ID. This was great because the ID being one of the major identification documents, helped you to become "more American" as there is no difference between the state ID and Drivers License of the American citizens and other non-American citizens. They look exactly the same.
Because the ID was so easy to obtain many people abused it and used as a form of identification during their illegal stay. So the US Government changed the rules and step-by-step have forbidden the issuance of State IDs for certain visa types. Thus right now if you have only a visitor visa (called B1/B2) in most states the DMV won't issue you an ID anymore. There might be some states which still allows you to make an ID card based on a visitor visa, but most don't. You can always check this by calling and asking a local DMV office.
Both the Drivers License and ID are valid for 5 years.
The procedures on how to obtain a Drivers License or ID slightly differs from state to state. I suggest checking the procedures for your particular state of interest. If you are interested in information regarding a specific state you can visit or call any DMV office, or you can find the info on the web here or searching on any search engine the keywords "DMV office".