I was riding my new Scott road bike yesterday and I nearly took a terrible fall. The pavement was wet and there was a curve. I was riding approximately 15 mph and I braked with the rear brake. As I applied the brake the rear tire nearly spun out from under the bike. Do you know what I did wrong?
You braked too hard given the road conditions, plain and simple.
The road was wet, which decreases your traction. You hit the brake, which uses the tire's traction on the road to slow the bike. If pressed too hard, the rear wheel will lock up and skid, which can be disastrous in a corner — the rear wheel will continue to follow its outward momentum. 15mph may not seem fast, but that particular corner may have been especially dangerous for any number of reasons:
To avoid accidents in the future, the first thing you should do is properly learn to use your front brake. The front wheel will not skid under reasonable cycling conditions. Other than that, you'll over time develop a sixth sense of how safe the road conditions are. Just pay attention to the corners and watch out for dips, debris, puddles, and the camber of the turn.
I suspect you either did not notice a slippery section of the path, or braked too sharply.
Have you done the usual tests on a new bike which also allow you to become accustomed to how the bike handles, or were you hoping to gain that knowledge experientially without falling? My suspicion is you are still not comfortable on the bike.
When you get on a new bike it's always a good idea to first test the brakes before you move, then once you're moving apply the brakes gently, then more firmly. Then speed up to walking pace and do an emergency stop. Do this somewhere very safe, possibly even in your living room. The goal is to break anything that's going to break easily, and detect problems like improperly fitted or insufficiently tightened cable fasteners. Then move out to an open area and do a series of turns and accellerations of increasing enthusiasm as you gain confidence and skill on the bike. You want this all to be done in a place where an equipment or technique failure will be embarrassing rather than fatal, like a car park or playground. Bike mechanics generally do this for every bike they service, calling it a test ride (excluding bikes that are returned unridden, possibly unrepaired, as they're judged unsafe or unrepairable).
When I'm buying a bike or testing for a friend I always take these tests to the point of locking up wheels. If you're not comfortable locking up your front wheel don't do that, bust you definitely should be able to deal easily with a rear wheel lockup under controlled conditions. Test the front brake to the point of lifting the rear wheel. Again, IMO a competant should be able to deal with that situation. And any bike must be able to deal with both of those situations without failing. Not, however, a rear wheel slide-out leading to a highside dismount - that will generally deform the rear wheel.
There are many reasons as to why you may have fallen. But I think the largest factor is that when using only back brake you don't have very much stopping power because the bike is accelerating backwards so there is a force pushing you forward. (This is like gravity pulling us down, but it feels like the ground is pushing us up.) This causes you to have little traction on your back wheel, and more traction on your front wheel. (traction is force x surface area.) Since there is so little traction on your back wheel it is already likely to slip. When going around a turn, even more so because "centrifugal force" is pushing your bike in the opposite direction of the turn. All of the forces combined with the low traction from the back tire make your bike likely to slip.
When the road is wet you should use your front brake more than your back because of the acceleration of braking there will be more of a force pressing on your front tire and it will give you much more stopping power and you will have much more traction (the converse of what I said in the first part of the answer). The problem is that if you are used to using your back brake you will want to be careful as to NOT apply the brake to quickly or you may flip over the handle bars and crack your new Scott bike.
Getting in the habit of using a front brake will be a good one to get into. I always used to use my back brakes only until I realized that it really doesn't have much stopping power, especially on hills. Now I go through front brakes nearly 3x as often as back brakes (on mtn bike and street bike).
But, as mgb said, you really should limit your braking while turning as much as possible, at least start braking before you start to turn your bike. Unless of course it is an emergency in which case you should be ready for the worse, even ditching your bike if you need to.