All these are greatly explained on Wikipedia, I'll just shorten it a bit. Let's start by what is the ECG. ECG or Electrocardiogram is a graphic 'representation' of the heart's electrical activity, produced by an electrocardiograph. With the ECG, a doctor can easily diagnose irregularities (or arrhythmias) in the rhythm or amplitude of a heart beat, also to pinpoint exactly where the problem is located. If your heartbeat hits more than two almost consecutive times (which can be listened with a stethoscope), then there's a reason to go see a doctor. With the ECG the physician is also able to identify if the heart's position is right in order to achieve maximum performance.
Our heart is automatized by the SinoAtrial node (or SA node), which is the natural heart pacemaker. The electric waves are sent to the heart muscle and create the contraction, hence "pumping". Although other parts have also automatic provocation (AtrioVentricular node and Purkinje fibers) of electric impulses, they're at a much slower rate, and with the law of 'all or nothing', while there's already an electric signal, their pacing is not taken into consideration (during depolarisation and first 2/3 of the repolarisation). The ECG is done through 12 electrodes, 6 on the extremities (aVR, aVL, aVF and LA,RA,LL) and 6 procordial placed around the heart's lower end (the apex).
Now what do all these letters on the right mean? Well, first things first: the positive and negative sign (above or below the "null" electroactivity line, as I call it). Positive is when the electric wave created heads towards the + sign of an electrode and negative when it goes towards the - sign. Each of the electrodes are attach as such to create a "global picture" of the heart's electrical activity, therefore help to spot the problematic area. Now the electrical waves are called P, QRS complex and T (and sometimes U, but that wave is not always seen). P represents the depolarisation of the atria, QRS the depolarisation of the ventriculi and T the repolarisation of the ventriculi. Where did the repolarisation of the atria go? It's covered by the huge depolarisation of the ventriculi (comparison), which makes the "repo" of the atria substantial and not printed. So we could say that the segment from P to Q (PQ) belongs to the atrial electrical activity and from Q to T (QT) to the ventricular electrical activity.
You can see how the electric waves move and how the electric activity is printed on the paper.