You may use warm or hot water for lights and whites. If in doubt, always use a cooler water temperature. Most laundry detergents work equally well in warm and cold water. Many machines have a water level indicator to match the size of the load being washed. It is better to use a bit more water than is necessary than not enough.
Some washing machines have a wash time duration indicator.
In general, dirtier loads should be washed longer that others. Use your judgement here. Follow the directions on the detergent package to determine the appropriate amount of for your load. It is advisable to let the tub fill up and begin to agitate before adding the detergent. This is especially true if you use powdered detergent because you want to be sure that the soap completely dissolves.