The short answer is: It depends :)

As explained in this video by Dan Pink the author of Drive: The Surprising Truth About What Motivates Us.

What motivates people to work are three factors:
-Autonomy
-Mastery (Challenge)
-Purpose

These three are mentioned too in the book Outliers: The Story Of Success by Malcolm Gladwell.

Disclaimer: Amazon link contains our affiliate link http://halalbuzz.com/Amazon. But that book is great and it was a bestselling book.