An EMG, or Electromyography, is a very common diagnostic technique used in neurology. Its purpose is to test the electrical activity produced by your muscles. More often than not, and EMG test is combined with another test called nerve conduction study which measures just that, how well your nerves conduct. Most neurological practices will frequently do both tests during the same visit. On average, duration of both is about 40 minutes, depending on the required complexity.
For your muscles to move, they require nerves as well as an electrical current. Keep in mind that this current is many times weaker than the one you have at home and as such, requires specialized and sensitive medical equipment to diagnose.
There are several medical conditions which affect the electrical activity in either the nerves, muscles or both. An EMG can detect and describe these abnormalities, and help a physician with the diagnosis.
These conditions include several common ailments caused by nerve injury or compression, like carpal tunnel syndrome, or those caused by nerve root injury, like sciatica. There are also many less frequently encountered medical conditions an EMG can help with, like muscular dystrophy or lateral sclerosis.
For an alternative explanation, here is a video from the Hattiesburg Clinic out of Mississippi.