I presume it's a front-loader? If so, turn off the power and wait a few minutes. You should then be able to open the door.
Before doing this you could try manually moving the machine onto the next step of the cycle (turn the knob that tells you which part of the cycle it is in)
This can overcome the problem, but it also helps empty the machine out if it is full of water. For example, you can manually force the cycle to drain.
HAL2100
March 2009