Discipline is the use of rules and punishment to control overt behaviour. It is the D in BDSM. This article discusses both discipline and punishment.
Punishment can be pain caused physically (such as caning), humiliation caused physically (such as an enema) or psychologically (such as public exposure) or loss of freedom caused physically (such as chaining the controlee to the foot of a bed, for snoring).
Punishment is often given in response to some rule being broken. Rules can be applied randomly by dominants as a tool for disorienting a sub, or by a sadist as a pretext to inflict punishment. However, a disciplinarian is one who enjoys gaining control over someone's physical actions and apparent behaviour by training them to obey clear and stated rules.
Bondage when used as a punishment is still bondage, but because it is overtly being done in response to a rule being broken, it is also part of the discipline. Punishment does not need to be physical. It can be loss of privileges (such as having an orgasm this month), being ordered to do a task (such as writing lines on a blackboard) on threat of further punishment if not finished correctly, it can be verbal humiliation, or really any act that you can inflict on the controlee or get them to inflict on themselves that they don't like.
Of course, one person's punishment is another's reward. For some of us, twenty lashes is a dread prospect. For others, it's the beginning of a lovely evening.
Many D/s relationships include the pretence of punishment as an item of play in its own right: acts that both partners can pretend constitute punishment, but which in fact constitute reward or mutual play. "You've been a bad girl, I'm going to have to spank you for that"; "Well, since you couldn't hold off coming, you'll have to clean that up with your tongue"; "If you won't stay still, I'm just going to have to tie you up." All of these sound, on the surface, like punishment, but any kinky person knows better. For many people who are into dominance and submission, but also into keeping things light, this sort of thing can be a major part of erotic play.