PC - Most models will have a plug-and-play, which will give you a pop-up in the bottom right corner of your start bar, right near the clock. When you click on this, it will show you how the process is going. In most cases, the keyboard will connect automatically after 10-15 seconds.
If that doesn’t work, you have a second option: open Microsoft’s Mouse and Keyboard Center by searching or it in your start bar. If your keyboard is Bluetooth-enabled, and not a standard radio receiver, there will be different steps in the setup wizard, which will connect your device for you.
Mac - Apple has been utilizing Bluetooth technology since their very first wireless device, so it’s a lot more straightforward. Whether it’s the Apple magic keyboard or another option for iPad or your desktop Mac, you’ll be able to use Apple’s built-in Bluetooth connectivity feature via the Bluetooth Preferences menu. Your Mac will scan for devices, and while your product is in Discoverable Mode, your Mac will locate and pair your device. For earlier Apple wireless devices, check out this guide from Apple on how to connect.