No you don't get a percentage of the yearly profits being a stock holder.
Stock shares are a way for a company to raise money to buy things.
In some cases, it just might give you a right to vote in a share holder's meeting.
A few companies provide dividend checks to certain stock / share holders, depending on the type of stock you might have purchased.
Keep in mind that not all stocks are alike. In most cases, you don't get a dividend payment from your stock purchases.
In most cases, it's value is very volatile and is subject to other stock owners' selling behavior. If someone or a large group of people dumps (sells) a lot of stock at one time, the price will usually drop significantly, often as a result of poor quarterly or annual earnings reports.
In conclusion you don't get a percentage of the profits from a company when you buy shares in the company.