When you give someone forewarning you let that person know that some event will happen in the future. You might give your elderly grandmother forewarning about her upcoming surprise birthday party, for example.
When Paul Revere famously rode through Boston alerting patriots that British troops had landed and were preparing to attack, he gave them forewarning about the army's advance. Since they knew about it before it happened, there was time to prepare. The fore part of forewarning is from Old English roots, and it means "before in time," or "in advance of." Warning also comes from Old English, originally warnian, "to give notice of impending danger."