If you forgot the passcode for the lockscreen, follow this article: iPhone and iPod touch: Wrong passcode results in red disabled screen
If you want to unpair you Bluetooth device, have a look at this article: iOS: Third-party Bluetooth headsets, headphones, and keyboards
Pairing with other devices to exchange data is not supported, unless you're using apps that allow to connect via Bluetooth, for example to play a game on both devices. These apps will provide the code for the other device you want to connect to.
You can connect to headphones and other Hands-Free devices using Bluetooth, see the supported profiles in this article: iOS: Supported Bluetooth profiles
Message was edited by: Ingo2711