Did you ask yourself this question before?
To answer such a question you need to go back to the physiological basics of electrocardiography. You must remeber that the ECG is the surface recording of electrical changes caused by electrical activity of the heart. At the culluar level those electrical changes are known as the action potential, which represents the potential differences across the cellular membrane as a result of a proper stimulus. The ischemia causes less negative resting membrane potential and loewr amplitude and longer duration of the action potential.
The ischemia is affecting a localized area and the rest of the myocardium is healthy and has normal action potential. This generates an electrical difference between the ischemic myocardium and the nearby healthy myocardium.
Systolic injury current:
During electrical systole (QT interval) the ischemic myocardium is less positive than the healthy myocardium (due to less amplitude of the action potential. This causes the electrical current to run from the healthy myocardium (more positive) to the ischemic myocardium. This is known as the systolic injury current. It is reflected in the ECG tracing as ST-segment elevation or depression according to the thickness and location of the ischemic area. If the ischemia affects the subendocardial area then the systolic injury current will be running from epicardium towards the endocardium (i.e. away from the body surface). The result will be ST-segment depression in the ECG leads corresponding to the ischemic territory. If the injuried area is whole thickness (transmural), then the systolic injury current will be running from the neighboring healthy myocardium towards the injured area. The summation vector of the resultant current will be directing outwards and causes ST-segment elevation in the leads representing the affected area.
Diastolic injury current:
The theory of diastolic current of injury is somewhat different. It is based on the fact that the resting membrane potential in the ischemic area is less negative in comparison with the healthy areas. This generates the diastolic injury current during the electrical diastole (TQ-interval). The direction of this current is from the ischemic area towards the healthy area. Thus it causes elevation of the TQ-segment in case of subendocardial infarction and depression of of TQ-segment in transmural infarction. But the TQ-segment is representing the base line for the ECG recording. So the net result will be apparent ST-segment depression and elevation respectively.
Images are from Braunwald's Heart Disease: A Textbook of Cardiovascular Medicine, 8th ed.