Shareholders of a company are part-owners of the company, and they are entitled to two things: voting for board members, and participation in earnings.
Owning shares (even one single share!) of a publicly-traded corporation entitles you to the right to vote in elections for the Board of Directors, as well as the right to receive a proportional amount of all the profits of the company.
These rights apply to common stock, which is generally the kind of stock traded on exchanges. Of course, you also have the right to sell your shares on the stock exchange at any time, in what is known academically as the Secondary Market.
Another kind of stock, called Preferred stock, has no voting rights.
Why Do You Want to Own the Shares of a Publicly Traded Corporation?
What are the Tax Implications for Making a Profit (or Loss) On a Stock?