What does Carrot and stick mean?

Carrot and stick meaning in Idioms Dictionary

If someone provides a carrot and stick, they offer a motivation to-do some thing with the danger of discipline.