First unplug the machine for 5 minutes and let it reset. Then plug it back in and let us know if the problem persists.
Lid Switch Assembly
If the washer stops mid cycle the lid switch assembly might be defective. This is a very common problem. The lid switch assembly can fail either mechanically or electrically. Test any electrical switches with an Ohm meter for continuity. The switches should have continuity according to their design.
Door Lock Motor and Switch Assembly
If the washer stops mid cycle the door lock assembly should be checked. The door lock can fail either mechanically or electrically. Test any switches on the door lock with an Ohm meter. The switches should have continuity according to their design.
Water Inlet Valve
If the washer stops mid cycle the water inlet valve cold water side may have failed. Most washers have a cold water rinse and so if they can't fill with cold water they just sit indefinitely waiting for the cold water to enter. If there is cold water to the water inlet valve and the cold water works in other parts of the cycle - or to make warm water - the valve is not the problem.
Enter your model number to see parts for your washing machine.
Main Control Board
If the washer stops mid-cycle the main control board might be defective. This is not common. Check other causes first such as the lid or door switch and other components.