I'm assuming a Bluetooth keyboard, since you said "pair". Make the keyboard discoverable, then search for Bluetooth devices in the phone. When it finds the keyboard, select it. If the phone asks for a code, it'll either be on a label on the keyboard (on the bottom usually), in the keyboard manual or both.
Then you go to Settings/Controls/Language and input, and select that keyboard. (Or select it from the notification pulldown each time you're in a box that accepts text.)