||This article has multiple issues. Please help improve it or discuss these issues on the talk page.
||This article needs additional citations for verification. (April 2009)
To think good thoughts requires effort. This is one of the things that discipline – training
– is about.
In its original sense, discipline is systematic instruction intended to train a person, sometimes literally called a disciple, in a craft, trade or other activity, or to follow a particular code of conduct or "order". Often, the phrase "to discipline" carries a negative connotation. This is because enforcement of order–that is, ensuring instructions are carried out–is often regulated through punishment.
Discipline is the assertion of willpower over more base desires, and is usually understood to be synonymous with self control. Self-discipline is to some extent a substitute for motivation, when one uses reason to determine the best course of action that opposes one's desires. Virtuous behavior is when one's motivations are aligned with one's reasoned aims: to do what one knows is best and to do it gladly. Continent behavior, on the other hand, is when one does what one knows is best, but must do it by opposing one's motivations. Moving from continent to virtuous behavior requires training and some self-discipline.
Military discipline 
Military discipline refers to the regulation of the behaviors of members of any military, involving rules that govern goal orientation and behavior inside and outside the institution, including the socialization processes that happen in military training. Rules of discipline are firmer or laxer depending on the prevalent culture of the military's country or institution. As early as the time of the Roman Army, discipline was enforced through military justice, but broader compilations of laws such as the Codex Theodosianus contained provisions dealing with military discipline.
Prison discipline 
Prison discipline refers to the means by which prison staff maintain order inside prisons and correctional facilities. This includes various types of punishments, such as solitary confinement, monetary restitution, exclusion from certain prison programs, and forfeiture of good conduct time. In the past, some prisons also used corporal punishment on inmates who violated prison rules.
Main article: Self-control
Self-discipline can be defined as the ability to motivate oneself in spite of a negative emotional state. Qualities associated with self-discipline include willpower, hard work, and persistence.
Self-discipline is the product of persisted willpower. Whereas willpower is the strength and ability to carryout a certain task, self-discipline is the ability to use it routinely and even automatically (as if through reflex). An analogy for the relationship between the two might be defined as follows: Where willpower is the muscle, self-discipline is the structured thought that controls that muscle. In most cultures, it has been noted that self-discipline is the ultimate path towards success.