For your safety, the lid of a top load washer cannot be opened during the spin cycle. To open it, simply stop the washer and wait 1 to 3 minutes for the safety lock to open.
On a front load washer, the door will be locked during the entire wash cycle. Before tumbling starts, you can stop the washer and then wait for the water to drain off the window before opening the door. To open the door during the spin cycle, stop the washer and wait 1 to 3 minutes for the lock to release—do not force the door open.