In operant conditioning, how do you get the subject to "pull the lever" for the first time? We're taught early on that the rat is placed within the following setup.



In that diagram, there are no potential distractions for the rat. There's only a lever.

1) Does the rat simply 'discover' the lever, or did researchers show the rat how it's done the first time?

2) In an environment with many distractions, how would you ensure that the rat pulls the lever for the first time?
Rats and other creatures are curious and like to explore their environments. When the action is easy, such as a large lever on the wall, most animals will find it quickly, and if the action is reinforced, easily demonstrate operant conditioning. In the case where the action is hard, such as Thorndike putting cats in puzzle boxes and observing how long it took them to escape, the motivation to find the solution comes from the animal seeking to escape: https://www.simplypsychology.org/edward-thorndike.html