If you have enough frequent flyer miles, you can use them to upgrade a coach ticket to first class. Check with your airline; many have specials throughout the year that make these upgrades easier and more enticing. Each airline may have varying requirements or limitations for the use of frequent flyer miles to upgrade fare class.
Airlines will also allow you to purchase an upgrade at the gate or as you check in. This is done on a space-available basis. If they have several seats free in first class, the airline will make more money by selling upgrades than they will by leaving the seats empty. Also keep in mind that some airline tickets are not allowed to be upgraded to first or business class even if there is space available in the cabin.