Routing protocols do not route traffic, they simply share route information between routers. If a router learns the same routing information from two different sources, it will use AD (Administrative Distance) to determine which source is most believable. The information from the most believable source is what gets installed in the routing table, but the same routing information from the other sources is kept in reserve in case the first source loses that routing information or has some other problem.
AD works like a cost or distance where a lower value is the most preferred. Cisco has defined default AD for its routers:
Route Source Default Distance Values
------------ -----------------------
Connected interface 0
Static route 1
Enhanced Interior Gateway Routing Protocol (EIGRP) summary route 5
External Border Gateway Protocol (BGP) 20
Internal EIGRP 90
IGRP 100
OSPF 110
Intermediate System-to-Intermediate System (IS-IS) 115
Routing Information Protocol (RIP) 120
Exterior Gateway Protocol (EGP) 140
On Demand Routing (ODR) 160
External EIGRP 170
Internal BGP 200
Unknown* 255
Other router vendors have their own terminology and values or other ways of choosing the preferred information source.