If you have internet, you can wire it directly using an ethernet cable. This is the easiest way to do it because it requires very little to set it up before it is ready to go.
If you already have wireless, you can get a game adaptor to plug into the Apex controller that will make it wireless. Might require some setup to get it working properly, though.
If you don't have wireless yet, you need to buy a wireless router and a gaming adaptor. The wireless router will set up your wireless network and the gaming adaptor will allow your Apex to contact your wireless network.