From the manual (or any one of the manuals, to be more accurate):
address-family
To enter the address family submode for configuring routing protocols, such as BGP, RIP and static routing, use the address-family command in address family configuration submode. To disable the address family submode for configuring routing protocols, use the no form of this command.
An explanation of what that actually means (from someone else) below. If you need more explanation than that, I suggest you shouldn't be mucking about on a [production] router, which sounds like it might be good advice in either case.
The address-family in the BGP configuration allows you to define a
specific behavior of BGP with regards to many supported Layer3
protocols:
IPv4 networks for unicast
IPv4 networks for multicast
IPv6 networks for unicast
IPv6 networks for multicast
CLNS (NSAP) networks
The BGP treats all these address families individually, as if it has
been configured in a separate instance for each of them. These
individual instances do not leak one into each other (even if they are
of the same basic type). This way, you can configure a single BGP
process to maintain several databases of different networks.
The BGP, as a multiprotocol routing protocol, can carry different
types of routing information in a single BGP session. That means,
however, that for each of these network types, you need to somehow
tell the BGP which neighbors also support the same protocol type,
which routes to inject, how are the individual networks going to be
filtered or their attributes modified, and so on... That is done in
the address-family context.
For example, a simple IPv4/IPv6/NSAP BGP could be configured as
follows:
router bgp 64513
bgp log-neighbor-changes
neighbor 2001:12::1
remote-as 64512
neighbor 223.255.255.1 remote-as 64512
!
address-family ipv4
no neighbor 2001:12::1 activate
neighbor
223.255.255.1 activate
no auto-summary
no synchronization exit-address-family
!
address-family ipv6
neighbor 2001:12::1
activate
exit-address-family
!
address-family nsap
neighbor
223.255.255.1 activate
no synchronization
exit-address-family
A single BGP process in this case is configured with three address
families: IPv4, IPv6, and NSAP (the OSI stack). There are two
neighbors defined, one by its IPv4 address, the second by its IPv6
address. In my example, both these addresses actually correspond to a
single neighboring router but of course they do not have to. Now, in
the address-family ipv4 context, it is configured that the we will
exchange IPv4 routing information with the neighbor reachable under
the IP 223.255.255.1. In the address-family ipv6 context, it is
configured that we will exchange IPv6 routing information with the
neighbor 2001:12::1. And finally, in the address-family nsap context,
it is stated that this router will also exchange the routing
information for CLNS networks with the router 223.255.255.1. All these
three different Layer3 protocols and their routing information will be
maintained by this single BGP process but it was necessary to specify
which neighbors speak which protocols. In addition, if we needed to
use route-maps, prefix-lists and other attribute manipulations for a
particular address type, we would also need to define them for
particular neighbors in their respective address-family contexts.