Fraudulent checks and money orders are key elements in many advance-fee scams, such as auction/classified listing overpayment, lottery scams, inheritance scams, etc, and can be used in almost any scam when a "payment" to the victim is required to gain, regain or further solidify the victims' trust and confidence in the validity of the scheme.
The use of check in a scam hinges on a U.S. law (and common practice in other countries) concerning check: when an account holder presents a check for deposit or to cash, the bank must (or in other countries, usually) make the funds available to the account holder within 1-5 business days, regardless of how long it actually takes for the check to clear and funds to be transferred from the issuing bank.
This is what makes the whole scam possible.
The check clearing process normally takes 7-10 days and can in fact take up to a month when dealing with foreign banks.
The time between the funds appearing as available to the account holder and the check clearing is known as the "float", during which time the bank could technically be said to have floated a loan to the account holder to be covered with the funds from the bank clearing the check.
The check given to the victim is typically counterfeit but drawn on a real account with real funds in it.
With a piece of software like QuickBooks and/or pre-printed blank check stock, using the correct banking information, the scammer can easily print a check that is absolutely genuine-looking, passes all counterfeit tests, and may even clear the paying account if the account information is accurate and the funds are available.
However, whether it clears or not, it will eventually become apparent either to the bank or the account holder that the check is a forgery.
This can be as little as three days after the funds are available if the bank supposedly covering the check discovers the check information is invalid, or it could take months for a business or individual to notice the fraudulent draft on their account.
It has been suggested that in some cases the check is genuine - however the fraudster has a friend (or bribes an official) at the paying bank to claim it is a fake weeks or even months later when the physical check arrives back at the paying bank.
One thing that is always the same is that the check is no good, and the money you wired is long gone.