I have to be honest, there is no guaranteed way to get an upgrade on a flight and of course, everyone on the aircraft is hoping for the same thing. However, there are some things you can do that may just increase your chances of getting an upgrade, if there is availability:
1. How you're dressed may influence a flight upgrade. If you're dressed relatively smartly (even casual smart), you're more likely to “fit in” in Business Class than if you're dressed in shorts and flip flops. The airline must consider passengers who have paid for the service so dressing a little smarter may just help you out!
2. Frequent Flyer Card. If you're a frequent flyer card holder, especially if you have points on the card showing you are a regular traveler, you're far more likely to be upgraded and will be given priority over any other economy class passengers that aren't members of the airline's scheme. If you fly relatively regularly and it's usually with the same airline – enrol in their scheme! (it's usually free)
3. Ask at check-in for availability of upgrades (and costs). It could be that there is no availability for an upgrade so ask at check-in if any upgraded seats are available. If there are, they will tell you what they are charging which is usually significantly reduced from the pre-paid rate for the upgraded seat. You may choose to pay the nominal fee or see if you are lucky later on to get it free (although if they are charging it's unlikely they will give the seats away free at the gate!)
4. Ask at the gate to see if any upgraded seats are still available and if there is any chance of being considered for it if there are. It doesn't hurt to ask and you may just get lucky.
5. Travel on your birthday. I've known passengers to be called to the information desk at the gate just prior to boarding because it's their birthday and offered an upgrade. Travelling on your birthday may allow them to look favourably upon you.