Routing protocols are used to discover routes to a destination. Only one routing protocol at one time determines the optimal route to a destination.
What happens if we have different routes to the same destination learnt by different routing protocols?
When multiple routing information sources coexist on the same router, the router with the highest preference is selected as the optimal route.
Below you can find the default route preferences by each routing protocol (the smaller the value, the higher the preference is):
Of course you can change these default values manually.
But what happens if different routing protocols are configured with the same preference?