It'll pump until the sun goes down. The answer to the second question probably depends on the well, rather than the pump - if there's a sufficient heat differential, the pump will continue to operate without water to pump (probably making disgusting slurping noises).