Learning takes place in many different situations. Operant conditioning requires a person to actually experience an event and learn from it such as, for example, if you spill whilst pouring water you will remember next time to pour more carefully to avoid the problem of cleaning up the spill.
A child sees a parent smoking (a common addiction) Latent and observational conditioning will warn the child against trying it as he watches the reaction of others who show their dislike of the 'habit.' However, if the child's curiosity gets the better of him and he actually tries it, he will learn (hopefully) not to do it again. Unfortunately, having tried it, he now knows (say) not to inhale too much smoke, for example and "next time" will smoke with more "skill." He is therefore not deterred, just wants to do it better:
the likelihood that a behavior will be repeated depends to a great degree on the amount of pleasure (or pain)
B F Skinner maintains that reinforcement is the key to conditioning and this reinforcement does not have to be positive but negative reinforcement and even punishment can render a person to repeat an action.
How we experiment with the environment, situations and events and establish what renders so called "desirable" results is the key to operant conditioning. The problem with "desirable" results is that everything is relative and if the desirable result is acceptance by a certain sector (such as smokers, drug-users, etc), the result will actually be a generally unaccepted outcome as another smoker will join the ranks of addicts!