Although effective brainwashing is a complex and difficult process, it can be summarized in two basic steps:

First, weaken or lessen the victims willpower through physical discomfort/pain, repetitive boring tasks, sleep deprivation, undernourishment (sometimes disguised as "religious fasting") or trance-like meditation.
Then, imprint the desired ideal upon the victim in an appropriately "traumatic" manner (the "trauma" may come in the form of emotional stress, fear, release from hardship, or some significant event).

For great examples of efficient brainwashing in action, refer to The United States Military, Organized Religion, Scientology, and Corporate America. Dick Sutphen wrote an excellent essay called "The Battle for your Mind", in which he describes how many of the above organizations utilize neuro-linguistic programming (NLP) to brainwash prospective members.

In recent times, with all the emphasis on individuality and self-awareness, "brainwashing" has taken on a decidedly derogatory meaning. The fact of the matter is, in order to become a great soldier, a great accountant, or great at swindling old people out of their pensions, you need to have been "brainwashed" to some small degree. What makes this a good or a bad thing is the quality of the message that has been imprinted on you when all has been said and done.