The ball is lying on ground and is at rest because no external force is being applied on it.
Hitter sets the bat in motion by swinging. Here the force originated at the moment of contact is equal to the product of mass and acceleration of both the ball and the bat. Newton's second law is clearly demonstrated when the hitter bunts.
The ball is hitting the floor and exerting force on the floor. As an opposite reaction, the floor is exerting the same amount of force on the ball, thats why the ball is bouncing.