Social institutions can send mixed messages to us about how we should behave. It is possible for some social institutions to encourage us to conform at some points and to be deviant at other points.
Let us look, for example, at religion, which is one of the major social institutions in any society. Our religions typically tell us to conform to our society in some ways. They tell us to obey our parents. They tell us not to steal. They tell us be faithful to our spouses. In these ways, they encourage us to act in ways that are seen as acceptable by our society.
At the same time, however, religion can encourage us to act in deviant ways. For example, Martin Luther King, Jr. acted in very deviant ways during the Civil Rights Movement. He acted in ways that were completely unacceptable in Southern society. He did so in part because his religious faith told him that that society was immoral. Religion can sometimes encourage us to go against society when it feels that societal values have gone astray and should be opposed.