If it’s a Bluetooth keyboard, go to Settings → Bluetooth, turn it on, and put the keyboard in pairing mode. For Smart Connector keyboards, you literally just attach it and it works instantly. No extra settings needed. Most basic typing works on all keyboards, but iPadOS shortcuts are better on Apple or higher-end third-party ones.