Alright, let me not get into the definition part of reinforcement learning and directly jump to the example. Let's consider a teenage kid who is trying to learn how to drive for the first time. He pushes the accelerator pedal and realized that the car moves when you push that. The moving car makes him happy and that's a reward. The car is stationary and the kid pushes the brake pedal and the car does not move, he gets sad and that is not considered a reward. Now the kid accelerates and then pushes the brake pedal and realized what's actually happening and again that's a reward.
In this case, a human learns from his experience and this is exactly what reinforcement learning is. There is one state s1 based on which it performs an action a1 and reaches a state s'1 and gets a reward. This algorithm is applied in a loop until the machine gets the maximum reward.