Water does not shutoff and overflows tub

[SIZE=3]The water never shuts off and overflows the tub and it doesn’t agitate. As I read in another thread, I turned on the water and unplugged the power. The water stopped flowing into the tub. Can this be a timer problem or something else? If it is a timer problem, how difficult is it to replace? Thanks[/SIZE]