The bigger and more believable the reward, the harder people try
Back to the windows: at 30 yuan a window, he cleans fast; raise it to 45, and he takes on a few more households. But however high the rate, he has to believe the money will actually reach him. Paid on the spot that day, 30 yuan makes him work harder than 60 yuan you say you'll give him at the end of the year if you feel like it. Fines are the same: a fine that's on the books but never enforced is one nobody takes seriously.
People do more of whatever they're paid for
Paid by the window, a window counts as one whether or not it has water marks, so the corners get skipped. Change the rule to "a window only counts once the owner has checked it," and he'll go back and clean the corners on his own.
People care about different things
Money is only one kind of reward; a promotion, recognition, or being watched less all count too. Offer the same weekend overtime pay, and someone rushing to make rent will take it that day, while someone who values their weekends will shake their head.
Piece rates, commissions and pay per order work best when the workers decide for themselves how the job gets done and the results can be counted. When the tools or the decisions aren't in the workers' hands, more money doesn't help: on an assembly line, the machine speed is fixed, so however much the workers want to do more, they can't go faster. Some things people do out of goodwill, and turning the motive into money can drive them away instead. In an experiment from Sweden published in 2008, people who came in for a blood donor health check were paid 50 kronor, and the share of women willing to give blood fell by almost half.