whirlpool washer

my washer fill with water but the program does not advance the rinse and spin cycles work when advanced manually please give me a solution to this problem