A router is a computer that forwards OSI layer 3 packets from network interface to network interface. It has a table (set of rules) called a routing table that makes it determine what interface it should sent a packet out on. Routers decrement the IP time-to-live on the packet they receive before they pass it on, meaning they have to recompute the checksum on the IP header.
An IPv6 router does not recompute the checksum as it doesn't have a field for this in its header.
BGP routing protocol
Routers that speak the BGP routing protocol are usually routers found at ISP's not home routers. BGP stands for Border Gateway Protocol and is defined in RFC 4271. BGP assembles a routing table that shows routes as chains of AS (autonomous system) numbers. Every network that speaks BGP has an ASN. By announcing its route to its neighbours (also BGP speakers) a router can give more weight in a certain route to itself and thus be able to influence the amount of traffic coming through a certain gateway. Also remote routers that wish to route to a certain AS have the choice to route to any announcement given. If a path is down the routing table updates itself and sends on alternate routes.
BGP works when your networks has two or more WANs connecting your LAN to the Internet. The ASN can be ordered by ARIN or RIPE regional IP registry since you also need your own IP address block to make this work.