ECG is a simple, painless test that records the heart’s electrical activity. To understand this test, it helps to understand how the heart works. With each heartbeat, an electrical signal spreads from the top of the heart to the bottom. As it travels, the signal causes the heart to contract and pump blood. The process repeats with each new heartbeat.