In reinforcement learning an AI tries out actions and learns from reward or penalty what leads to the goal.
Example
An AI learns a game by playing thousands of rounds and favouring moves that led to more points.
For pros
An agent picks an action in a state and receives a reward; it optimises the expected total reward. For language models RL is used in RLHF and to train reasoning models on verifiable tasks. Poorly chosen rewards lead to unwanted shortcuts (reward hacking).