When you buy a bond or another debt instrument, you are lending your money. That means you are a creditor, which is someone who is owed money. You must be paid back in full together with interest. If the company goes out of business, you have a good claim on any assets that may be left over.
As a shareowner, you own part of the company. You have the right to share in the profits and the growth of the company. However, if the company goes under, your claim to what's left over falls behind any claims of creditors. This makes your investment a little riskier, although that will depend on the particular stock.
Bonds and other debt instruments offer interest or some form of fixed income, which means that you know how much you can expect as a fee for lending your money and you know when you will be paid that income.
Stocks, on the other hand, don't have to pay any interest, because you are not lending money to the company. You may be paid a dividend, while is a payment like interest, is actually a share of profits. Some kinds of shares always pay a dividend, while others do not. Whether dividends are paid often depends on how well a company is doing. With some stocks, what you are counting on is that the company will grow in value and that your share, as part-owner, will grow in value with it. When you sell it, you will then make a profit or a capital gain.