Generic Routing Encapsulation is a protocol that can provide connectivity to a variety of network layer protocols by tunneling them over an IP based network.
Generic Routing Encapsulations origins come from a legacy protocol called Internetwork Packet Exchange (IPX). GRE would be able to carry IPX packets over an IP network via encapsulation through a tunnel.
Generic Routing Encapsulation is more commonly used as an overlay protocol for IPv4 and IPv6 networks, one example is for creating a VPN.
When a packet is encapsulated for a GRE tunnel, additional headers are tagged onto the packet. These additional headers contain the remote end IP address as the destination.
This new header information allows forwarding of the packets without a deeper inspection required of what is inside the payload.
Once the the packet reaches the destination IP address, the additional headers are stripped off and the original packet can be forwarded from the destination IP address router.