If your case is denied, how long will you have to wait before you can re-file?
In the case of a fiance or spousal visa, it usually can take two to three months for the embassy to send your case back to the National Visa Center (NVC) and then the National Visa Center sends your case back to the USCIS where they'll review your case again. They may reaffirm it, meaning review it, approve it, send it back to the U.S. Embassy, or they may revoke the approval notice from the USCIS. That process can take two to three months. It also can depend on the reason why your spouse or fiance was found to be ineligible.
You may not be able to re-file at all, depending on the reason for denial. When you get that denial letter from the USCIS, find out the exact reason why you were found to be ineligible or why you were denied, and then go from there.
If you're really in a rush to re-file, you know the exact reason why you were denied, there are some cases when you can submit a letter to the USCIS requesting that they close that case. The reason why you want to close that case is that it's not recommended that you have more than one active application or petition in the system. If you do have multiple petitions in the system, it could be viewed as immigration fraud - that you're just doing anything to get to the United States, and receive an immigration benefit. That could be viewed or construed as being immigration fraud.
That being said, the easy, safe method would be to simply wait until you get your denial letter. You can also, in some cases, schedule an InfoPass meeting with your local USCIS office. Sometimes they can look into your case or file and help you out. You can also contact your congressman or senator, or submit a FOIA request.