You have to hook up a scan tool to the OBD port under the dash and go to the clear code menu. Before you do this, check the codes and write them down. If the light comes back on after you drive for a while, you should recheck the code to see what it is. This will help you to determine what the problem is if there happened to be more than one code the first time.
I think Autozone might do this service for free. I know that Pep Boys will read your codes and clear them for something like $29.95. You can also buy an inexpensive code reader from most auto parts stores and do it yourself.