This usually happens when the steering wheel is turned after the key is removed. There is a built in anti theft system that causes the wheel to lock when it is turned without the key on. The locked wheel, in turn, will prevent the ignition switch from moving; until the pressure on the wheel is released.
So the way to free the ignition switch is to try turning the wheel from side to side, through the small amount of movement which is possible; while trying to turn the ignition key with your other hand. There is only one position of the wheel which will allow the key to turn.
Sometimes, if the steering wheel becomes locked when it is turned as far as possible in one direction, it becomes nearly impossible to free the ignition switch. In that situation; it may be necessary to jack the front end of the vehicle up high enough that both front wheels are off the ground. That will take most of the pressure off the steering wheel; which should make it easier to then free the ignition switch.
This problem can be prevented in the future by developing the discipline of not moving the steering wheel when the ignition key is not turned on.