An Electrophysiology study or EP study is a medical test which uses electrodes inserted through a catheter into the heart in order to assess its electrical activity and conduction pathways. It's usually used to detect arrhythmia.
In order to perform the test, a catheter is inserted into the body, usually through the femoral vein in the groin or the radial vein in the wrist. From there, it's worked into an artery and guided to the heart. Large magnets are used on either side of the patient to guide the electrodes to different areas of the heart with the help of an X-ray machine. Each chamber of the heart is then stimulated electrically and the result recorded on an EKG. The electrodes can also be used to destroy any cells in the heart that are causing the arrhythmia.
The procedure is actually minimally invasive and has few dangers or serious side effects.