The BGP system calculates a score for each path based on its attributes. The system compares the score of each path to a given destination and selects the path with the highest score. It will ignore paths where the next hop device is unavailable or if the path is marked as not synchronized.