There are a variety of factors that affect the bounce of a ball, such as the size and shape of the ball and the rigidity of the surface it was bounced on. The ball trying to maintain its most stable shape is what actually causes the ball to bounce.
For example, in a tennis ball, the ball is most stable in its original round shape. When the ball hits the ground, it is forced into a more elliptical shape. This causes a build up of gas pressure within the ball that pushes out on all sides, causing the ball to bounce back up.