Check your water heater and make sure it is not depleted of hot water and that it is functioning correctly.
Make sure the hot water valve leading into the machine is not closed. The machine will only run with cold water if only the cold water valve is open.
Check the machine's water temperature setting and make sure it is not set to cold.
Check to make sure the water inlets and water-supply valves are connected to each other. If the hot water connector hose is not connected, there is no way for water to flow from the water-supply valve to the inlet on the machine.
Unscrew the hot water and cold water hoses from the hot and cold water supply valves and make sure the hoses are connecting the correct valves to the correct inlets on the machine. If someone has accidentally cross-connected them, it may seem like there is no hot water because you have the hot water inlet connected to the cold water valve.
Switching the hoses should fix this problem.
Remove the hose from the hot water inlet and check the inlet valve screen for debris that might limit the flow of hot water into the washing machine. If there is debris on this screen, remove it.
Reattach the hot water hose and the hot water now should flow correctly.
Straighten the hoses and make sure they are not kinked or pinched. If the hose is pinched, the water will not be able to flow through it as efficiently as it should, and maybe not at all.
If there are severe kinks in the hose, you probably should replace it.