Does anybody know what it means when you have a headache and your nipples feel sore?

Wow. That really depends on the rest of your history. If you are female, pregnancy comes to mind. Otherwise the differential diagnosis is large. Could be muscular. Could be hormonal. Get it checked if it lasts longer than a couple days or if it goes and comes back.