This has to be the second-most misunderstood statement. Here's how it works.
Each routing process maintains its own routing table. So there is a table for BGP, a table for OSPF, a table for RIP, a table for static routes, a table for routes to connected interfaces and so on.
There is a forwarding table. This determines the next-hop of packets flowing through the router.
Entries in the routing table are placed into the forwarding table. If two routes clash then the routing protocol with the better "administrative distance" wins: connected > static > exterior routes > interior routes.
Entries in the forwarding table are placed in a routing table is there is an exactly matching "network" statement in the routing process's configuration and the entry in the forwarding table wasn't put there by this routing process.
Let's take the trivial case, a connected interface
interface Ethernet0 ip address 18.104.22.168 255.255.255.0 router ospf 65000 network 22.214.171.124 0.0.0.255
You often see this
Don't do that, do this:ip route 126.96.36.199 0.0.0.255 188.8.131.52 router ospf 65000 redistribute static
ip route 184.108.40.206 0.0.0.255 220.127.116.11 router ospf 65000 network 18.104.22.168 0.0.0.255
Getting rid of the "redistribute" statement removes a common cause of routing loops. "Redistribute" should really be a hidden command, it's only useful for people who know what they are doing.