When we learned about static routing we found that a lot of manual configuration was involved and a change to the topology also required manual configuration changes. Dynamic protocols work by advertising routes to each other.
The configuration is the opposite of static routing; here, we enable dynamic routing on the required interfaces. The routing protocol then forms "neighborship" with other routers and sends them the directly-connected routes and other received routes. In this way, all routers exchange updates with one another. When a topology change occurs, those updates are also sent out by routers that learn about this loss of connectivity.