Both verbs concern an event or action in the future and they are interchangeable to some extent.
If we foresee something, it implies that based on our past experience, we can see what will happen in the future. It is often used to describe an economic or social phenomenon, e.g. ‘no one could have foreseen the consequences of the economic crises’.
The verb ‘anticipate’ refers more to an expectation, to something we are looking forward or we are sure of. It is also used to refer to an action that is performed in advance.