Most people try to buy and sell simultaneously, which is almost certainly the best way to go - if the market cooperates. But ultimately you'll probably have to decide whether to accept an offer on your home before you've found a new one - or to buy a new property before yours is sold.
Can You Carry Both Properties?
If you buy a new home before your old one is sold you'll be faced with carrying two mortgage payments for an undetermined period of time. Can you handle this financially? Will you be able to fund the down payment on your new home without the sale proceeds from the old one? If your income is sufficient to carry the payments, a bridge loan may help you get through this period.
Are You Willing to Rent?
If you accept an offer for your home before you've bought a new one you may have to move into a short term rental until you find something to purchase. Are you prepared to move twice, with all the hassle this entails?
The ideal situation is to make the first contract contingent upon the other. For example, you agree to purchase a home but not to close until you've sold yours. Unfortunately, few sellers will agree to this kind of condition (and few buyers will agree to wait until you find a new property). You may be able to negotiate the right to stretch out the closing date by a reasonable period, however. This gives you more time to try to match up the closing dates.
Buying a New Home
Purchasing a home that is under construction (or not yet started) gives you considerable time to sell your existing property. Don't forget, however, that you are still committed to close on the new house when it is completed. Make sure you are able to do so even if you can't sell your present home - or if you have slash the price to do so.