I'm thinking of applying to schools in the United States. I know that tuition is expensive, but my family is willing to pay for this even though they're not rich. It looks, however, like I might have to put down at least part of my tuition before the time when I would go to the U.S. consulate to apply for the student visa. This has me worried -- what will happen if my visa gets denied? Can I get the tuition money back?
It's wise of you to consider this possibility. A student visa may be denied for any of a number of reasons – for example, if the consulate thinks you can't afford to pay for your studies, or that your English isn't good enough, or that you have insufficient ties to your home country to convince them that you'll really return when your student stay is finished. For more on the application process, see Nolo's articles on "Student Visa (F-1, M-1, or J-1) Application Process."
Colleges and other schools in the United States will typically refund any tuition that you paid in advance, if your reason was denial of your student visa. That doesn't necessarily mean you will get back every dollar that you paid to the school, however. If, for example, you paid an application fee, that will probably not be refunded. And some schools charge a refund-processing fee.
Whether other types of fees may be refunded may depend on things like timing. If, for example, you requested pickup at the airport (for which a fee was charged) and then you wait until months later to put in your request for a refund, you are unlikely to get this money back.
If in fact your visa is denied, be sure to retain the denial letter from the U.S. consulate. Many schools ask that you include this, as well as your original Form I-20, in your refund request.