OSPF is a link-state routing protocol used within an autonomous system. Each router maintains an identical link state database describing the network topology and calculates shortest paths using the SPF algorithm. Routers establish adjacencies to exchange routing information and databases are synchronized during the exchange process. OSPF supports features like equal-cost multi-path routing and areas to reduce routing traffic and provide protection.