If you feel dizzy during or after a workout or race, lie down. Do not sit or stand still. The cause may be minor, but if you stand or sit your blood pressure can fall dangerously low and cause you to faint.
Lying down will usually normalize your blood pressure, and also keep you from getting hurt if you fall. Check with a doctor after to identify the cause.