An SOR keeps a live picture of every venue's quote, fee schedule and historical fill rate, then decides in microseconds where each slice goes. Good routers also model latency, because a quote you cannot reach in time is not a quote.
Sequencing matters as much as selection: send to the slow venue first and the fast one last, so all your immediate-or-cancel orders arrive at the same moment and nobody can fade in between.
Example: 10,000 shares wanted, with 3,000 at 50.00 on three venues each. Naive routing hits venue A, the other two see the print and pull, and you pay 50.02 for the rest. A latency-aware SOR times all three so you get 9,000 at 50.00.
Related: order-routing, intermarket-sweep-order, dark-aggregator