Open Shortest Path First (OSPF) is an interior gateway protocol that uses link state routing and the Dijkstra algorithm to calculate the shortest path to destinations within an autonomous system. It elects a Designated Router to generate network link advertisements and assist in database synchronization between routers. Routers run the Shortest Path First algorithm on their link state databases to determine the best routes and populate their routing tables.