When the ball is released freely from a height, its potential energy is converted into kinetic energy as it falls. By the principle of conservation of mechanical energy (assuming no air resistance), the potential energy at the initial height is equal to the kinetic energy just before hitting the ground.