How does operant conditioning work?

Hello! I'm writing a paper tomorrow and I just don't understand this topic. In my book, it's explained with several rats, each pulling different levers, but on YouTube ( https://youtu.be/wXYNRJ6cRpg?si=Zv1rB2rLW-EgjCx7 ), a guy explained it completely differently. He said positive punishment would be, for example, a hit AFTER pulling the lever, and a positive reward,…