It heavily depends on the kind work and the clients you target and accept.
* always demand partial payment up front (usually 20-50%, depending on contract size and length)
* set milestones with additional payment required upon completion (for bigger jobs)
* have a contract that only transfers usage rights and copyright upon final payment
You can always get screwed over or have bad luck (client goes bankrupt, ...), but some prudence in selecting work goes a long way.
When starting, I learned to stay away from anything gambling and real estate related.
Or do like I did and end up working full-time for a client that does pay well. That brought my non-payment rate down to 0%.
You can mitigate this risk in the following ways:
* Focus on taking in referrals; you're less likely to get hosed if you know a way back to them.
* Fixed contract + payment plan. As much as you can, negotiate one and have everyone sign it.
* Get clients in your geographic proximity. Spend a lot (say, 3 hours) of unbilled time with them in advance of closing a deal. This gives each party a chance to suss out the other. As with the first bullet point, you're less likely to get scammed because you probably know where they work.