If you are applying for adjustment of status (a green card) in the United States, you will need to have a medical exam done. People applying for immigrant visas from overseas must also have a medical exam done, but the process is slightly different.
(Exceptions to the exam requirement are made for some people who had the exam done before they entered the United States, such as entrants on a K-1 fiancé visa; they can use the results of their earlier medical exam, which should already be in the local U.S. Citizenship and Immigration Service (USCIS) office’s files.)
Your medical exam can be conducted only by a government-approved doctor. If you're in the U.S., the doctor is known as a "civil surgeon." A list of these doctors is available on the Find a Doctor page of the USCIS website. You can also get this information by calling the Customer Service Center at 800-375-5283. If you're overseas, the doctor is known as a "panel physician." To find one, go to the State Department's immigrant visa processing web page for medical examinations and follow the instructions. The fee varies among doctors, so you might want to call a few before choosing one.
You have to submit your exam results to USCIS or the consulate within a year after the exam, so don't get the exam done too soon before applying. If you're overseas, you will be instructed to go for the medical exam shortly before your visa interview.
If you're adjusting status from within the U.S., it's a good idea to file your adjustment application before getting the medical exam, and then wait for USCIS to ask you to bring the results of the exam to your adjustment interview. That's because USCIS considers the results to be good for only one year after you submit them—you don't want them to expire (and have to pay the doctor again) in case USCIS takes a really long time to process your application. The one-year rule is not based on any law, it is just USCIS policy. But that policy could change, so it is best to play it safe.
A U.S. doctor must fill out a USCIS Form, called an I-693, in order to report the results of your exam. Overseas doctors fill out a form called DS-2054.
For what happens during the exam, and the purpose of the exam, see What the Medical Exam for a U.S. Green Card Involves.
Once all your results are in, the doctor will fill in the Form I-693 or DS-2054 and return it to you in a sealed envelope. Do not open the report envelope—doing so will invalidate the results.
If you're overseas, the doctor might send your results to the consulate directly.