"Under Contract" is a general term Realtors use to indicate a contract to purchase the house has been signed. Often we use this term to indicate that contract is not merely an option to buy that the buyer holds, but rather the buyer and seller have agreed on a price, repairs, financing and a closing date. Usually we refer to these contracts as "Pending." But, a Realtor could use this term to mean "Option" also, because that is a contract, too, just one that a buyer could get out of simply by notifying the seller that he doesn't want to take the option. So, the 3 terms are option contract, pending contract, and under contract (meaning either).
A pending contract does not mean that the contract cannot fall through. It could for a variety of reason, but the vast majority of pending contracts these days do close. The main reason pending contracts fall through is for financing problems. The buyer apparently qualified when the contract was executed, but later his lender said he could not get the loan approved.
The typical stages of a contract are that the buyer makes an offer, some negotiation may occur between the buyer and seller (through their agents), and a contract is executed (it's now under contract). The contract may contain an option period for the buyer, who can use this time to consider the property, do inspections on the property, or whatever he wants to decide if he wants to proceed to close. Some negotiations may occur during the option period, too. The contract might be called an "option contract" during this time. The option period is not automatic and the buyer pays for the option. The buyer does not need to state a reason for backing out of the contract during the option period.
Usually the time after the option period is over is when we call the contract "pending."
Once the option period is over, the next milestone is the end of the financing notice period. Usually a contract has an addendum stating that the contract is contingent on the buyer's ability to get a loan at a certain interest rate of a certain length. Sellers usually ask to see a conditional qualification letter from a lender before execution, but other documents are needed by the lender to approve financing. If the lender decides that the borrower will not be approved, he sends a notice to the buyer/borrower. The buyer in turn can notify the seller that his financing fell through. The buyer still gets his earnest money back when he properly notifies the seller of the problem. No, he won't get back the fees he paid for inspections or the option fee, but his earnest money will be returned if he notified the seller by the date in the financing addendum. This is usually during the pending phase of the contract.
The property must also be appraised by the lender. Some Realtors are confused that approval by the lender includes the appraisal, but it doesn't. If the lender appraised the property prior to the end of the financing notice period, then the approval can include the property's suitability for lending. If the property is appraised after that financing period is over and found too low a value, the lender can again send a notice to the borrower that the property is unsuitable for lending the amount requested. Even though the financing notice period is over, the buyer can then back out of the contract and still get his earnest money back. Typically, this does not happen. Sellers recognize that appraised values limit the amount buyers can borrow, and often will negotiate further to close the sale.
Once financing is approved, title matters organized and documents prepared (mostly by the lender), the closing may proceed. Until the deal is closed the property is still considered "under contract" from the time the contract was originally executed.
Remember, as with most things in life, people use terms somewhat loosely on occasion, but now knowing better what the process is, you can interpret what they mean.