In static routing, the router has predefined rules to get packets from one network to another. For example, to get from network A to network C, the next hop is the device at address B.
In dynamic routing, the routers build a routing table from information they learn from other routers through one of several routing protocols such as RIP, EIGRP, BGP, etc. Predefined rules are not needed.
A big advantage of this is flexibility. If something changes in the network, the routers will automatically update their routing tables. This can help get around routers that are offline or can help find a more efficient path from one place to another.