If the key or thumbturn will not turn, push or pull the door gently toward or away from the frame while turning. Try lifting slightly on the handle, or pressing near the lock. If the bolt suddenly releases, the lock is probably sound and the problem is alignment. Note which direction helped; it tells the technician where the door is binding.
Do not force the key. A key under heavy torque can bend or snap inside the cylinder, which turns a stuck bolt into a broken key extraction. Avoid hammering the bolt or prying at the frame. Those attempts damage the strike, the bolt and the door edge.
If the deadbolt turns freely but the bolt does not move, the connection between the cylinder and the bolt may be broken. That is a different fault, closer to a key that turns while the door stays locked.