A share of stock is a fraction of a company. Owning one makes you a part owner: you are entitled to your proportion of any profit the board chooses to distribute as a dividend, and in almost all cases to one vote per share at the annual meeting.
The price on the exchange is not the accounting value of that fraction. It is what buyers will pay today for the earnings they expect tomorrow, which is why two companies with identical balance sheets can trade at wildly different prices.
Common stock sits last in line. In a bankruptcy, lenders and bondholders are paid first and shareholders receive what remains, which is frequently nothing. That subordination is the reason stocks are expected to return more than bonds over long periods.