Cisco IOS uses what is known as the administrative distance (AD) to determine the route to install into the IP routing table
The AD represents the "trustworthiness" of the route where the lower AD value, represents the Preferred route source
The Router will then use the Route with the lowest Administrative Distance