Zend certified PHP/Magento developer

Why I’m seen “Invalid Form Key. Please refresh the page” in the frontend?

Sometimes I’m receiving this message below during the customer log in,

Do you know why and when this message shows up?

Invalid Form Key. Please refresh the page

Magento2 Invalid Form Key. Please refresh the page