Are you holding your breath while doing exercises?
Ask a personal trainer to check your form the next time you are at the gym. The most common reason that people get headaches while working out is because they aren't breathing properly during their workout.