Cardioversion is a procedure that is done to return your heartbeat to a normal rhythm. You take medicine, either through an IV or by mouth.