Given a scientific question, generate a correct answer to it.

Where does an object gain or lose it's energy to during travel through a potential difference?
electric field