A corporate bond is a debt security issued by a company to raise money. The SEC describes the arrangement plainly: corporate bonds "are debt obligations of the issuer," where "the company promises to return the face value of the bond, also known as principal, on a specified maturity date," and "until that date, the company usually pays you a stated rate of interest, generally semiannually." Owning one gives no ownership interest in the company, which is the difference from owning its stock.
What separates a corporate bond from a government bond is not the mechanics, which are the same, but the fact that the promise can fail. A company can stop paying. That possibility has a price, and the price is visible: it is the difference between what this bond yields and what a government bond of the same maturity yields, commonly called the spread. When the spread widens, the market has decided the promise is worth less; when it narrows, the market has decided the opposite. A buyer choosing a corporate bond over a Treasury bond of the same length is accepting that judgment and being paid the spread for it.