Need some info -- what is the model number ? Are you saying it fills with water but it is pumping it out at the same time ?
Here's the first thing to check for . Remove the bottom kick plate - you'll see the motor which is attached to the pump. On the side of the pump is a solenoid valve which when energized pulls down and opens a flap inside the pump to let water go to the drain. See if that is stuck or the solenoid is melted. It should move up and down very easlily - it should be up when you observe it with dishwasher not running. It only gets energized for a minute when the timer tells it to pump out ( 7 times in normal cycle )
You'll need to replace the timer. Part number is XXXXX around $96.00 from www.partselect.com