It means that it removes or eliminates motivation or interest in something. It makes you lose your temper or your spirits. It is used to discourage, deter. It may also mean that it causes disappointment.