Keyboard shows on iPhone 4 on lock screen and home screen

Solution 1:

This is a glitch — simply reboot to fix it, either by rebooting normally or by doing a hard reset (hold both home & power until the Apple logo appears).