Routing protocols are rules used by routers to discover routes, add routes, and maintain routing tables for packet forwarding.