To what degree or under what circumstances should an individual rebel against, rather than conform to, society?

To what degree or under what circumstances should an individual rebel against, rather than conform to, society?