According to the U.S. Department of Energy, balls made of elastic materials such as rubber bounce because the material stretches and deforms when they hit a surface and then reform back into their original shapes, which releases energy into a kinetic form, causing the rubber ball to bounce.
The chemical make up of a ball determines how much the ball can be deformed, and therefore how much of the original kinetic energy can be converted back to kinetic energy when the ball hits a surface. This is called the 'elasticity' of the ball. In contrast an object that is inelastic would cause the energy to dissipate by some other means. For example, a ball made of mud deforms when it hits a surface, but it can't store and reconvert the energy to kinetic energy, so it doesn't bounce very high, doesn't bounce at all or releases its potential energy by destroying itself.
According to Exploratorium, the energy that can't be converted into a kinetic form during an objects bounce mostly turns into heat. A ball of putty dropped to the ground gets warmer, and even elastic materials, like a racquetball, get slightly warmer with each bounce. The less energy that is converted to heat, the higher the ball bounces.