You might find your answer here and here
You get reputation for lots of things on this site and other StackExchange sites - it is useful as the better a user is at asking and answering questions, the more reputation they get so they have the most reputation overall, which can be used to distinguish them from other users. Reputation also acts as an incentive to provide good questions and answers. An exception to reputation gains/losses is Meta (this bit of the site), where you don't earn reputation from as it just for questions about the site (full scope here)
Also, as a user with more reputation generally indicates more experience, users with more reputation are awarded privileges, which can be used to help manage the site.