The line between the giving and receiving of Discipline and Sado-Masochism (SM) is not clear and will vary based on an individuals view point (what for one is a sexual act of caning for another would be an act of brutality).
In its broadest sense, the difference is one of consent. Whereas in Bondage and Discipline, the use of trust and safe practices (safe words etc) is paramount, for the sadist, the pleasure in causing pain does not depend on the consent of the ‘victim’, indeed, a lack of consent may be a requisite part of the experience for a true sadist.
Similarly, the true masochist will, normally as a substitute for sexual pleasure, allow themselves to be physically abused, maybe to the point of torture where they relinquish all power to the sadist. In extreme cases, SM can be considered part of a mental disorder, not necessarily as disorders in and of themselves, but only as disorders when associated with other problems such as a personality disorder.