The router does this via an internal routing table stored ... Just on the LAN, you can do things like wirelessly print documents from your PC or unlock your front door with your phone.
A good router should be able to take full advantage of whatever internet speeds you're paying for -- but if your network seems more sluggish than you'd expect, then you'll want to take some steps to ...