There are many routing protocols, including OSPF, BGP, and EIGRP. Many of these support different layer-3 protocols. These include IPv4 and IPv6.
From the perspective of the routing protocol, IPv6 and IPv6 are address families.
There are other types of address families too, such as VPLS and MPLS. These are used with BGP.
Address families allow different configurations to be applied to each protocol. For example, we may want to advertise the IPv4 default route, but not the IPv6 default route.
We can also use address families to independently configure unicast routing and multicast routing.
Not all routing protocols support address families. OSPFv2 for example only works with IPv4.