Check the Owner’s Manual
It is possible you are attempting to open it incorrectly. The owner’s manual will explain the correct procedure for safely unlocking the door following properly executed operation of the oven.
It may also have a troubleshooting section that can help if the door lock has frozen or is malfunctioning.
Reset From the Control Panel
Many models have a control panel that operates the various stove and oven functions. For ovens, there is often a “Stop” or “Off” button that turns the oven off.
Pressing and holding this button down for an extended period can reset the door lock. Start by holding it for 10 seconds.
If that doesn’t work, increase the duration by 10 seconds each time until you each 30 seconds; the amount of time needed can vary from one make or model to another.
Run the Self-Clean Cycle
If the door won’t open and there is no food inside the oven, you can run the self-clean cycle on the oven. If you have options for a short clean cycle or a long one, choose the short one to save time.
Allow the oven to complete the full cleaning cycle without disturbance. Once the cycle has completed, the oven door may unlock automatically.
However, if there is food in the oven, this is not an option. Simply allow the oven to cool completely and try to open it again.
Disengage the Power
Manufacturers such as Whirlpool recommend disconnecting the power for a brief time to unlock a stuck oven door. One way to do this is to turn off the circuit breaker or remove the fuse that controls the stove.
Leave power disconnected for a minute or two, then turn the breaker back on or reinsert the fuse. Wait another minute or two.
The oven door should now open.
Call for Service
If none of the above options work to release the door latch, it is likely there has been some kind of mechanical malfunction. It may involve the computer or the mechanism itself.
Without the proper training and expertise to resolve this, the best option left is to call a reputable repair technician. If your oven is still under warranty, contact the manufacturer.