An appraisal contingency protects home buyers from buying a home that could be valued less than what it is really worth. The process is that a mortgage broker or bank will assign a professional appraiser to compare other similar sold properties to the one you are buying. When the appraiser looks at the comparables, he or she will place a value on the property through using a lengthy evaluation.
It is important that you understand this so you will know why an appraisal contingency is very important if you are a buyer.
Janet, As long as your mortgage contingency is in effect you shouldn't have a problem getting your deposit back. Check with your agent. For future reference it would be a good idea to put a clause in the next Purchase and Sale agreement saying subject to property appraising for sale price.
Best of Luck.