Routing protocols such as RIP advertise routes as vectors, where distance is the cost measured in network hops.
When the router receives routing information from a neighbour, it will store it in a local routing database when received. Distance vector algorithms such as the Bellman-Ford and Ford-Fulkerson algorithms are used to determined which paths are the best loop free paths to reachable destinations. Once the best paths have been determined they are installed into the routers routing table and advertised to neighbouring routers.
Routers utilising distance vector protocols advertise their routing information to their neighbours from their own perspective, not from where the original route was received. This means that the router does not have a complete map of the entire network topology, rather just how to reach a network via a nearby destination router and how far away it is.
This incomplete topology brings the advantage that overheads with running a distance vector protocol can be low in terms of CPU usage and memory.
It is important to note that distance vector protocols take no notice of link speeds and congestion, just purely the hop counts to reach the destination. One slow link will be favoured over 2 fast ones.