You are under the sink, so the following things should be readily available: bucket or large container towels pieces of plastic (old wrappers, garbage-bag, etc.)
Let me first say; do this as quickly as possible.
It doesn't have to be a solid fix, and you are gonna have some spillage.
The main reason for doing this is to make sure the room doesn't have 10cm of water in it before you had the chance to turn of the water: Put the bucket (or other large container) under the broken pipe.
Take the piece of plastic (preferably a garbage-bag) and hold it over the hole in the pipe.
Use the towels to wrap around the plastic around the pipe
(you can tie them in a knot to keep everything in place).
If you have pieces of string available, tie one tightly around the pipe over the towel above the break, and one below the break.
Run like hell for your main shutoff-valve !
lifehacks.stackexchange.com/users/128/RichardBernards
If the pipe is completely broken, crimp the end over or bend the pipe.
I put a spade thru an underground water pipe in the garden many years ago
and it shot a fountain of water 30 feet (9 metre) into the air....
so I called the water utility -
a chap turned up and hit the pipe with a hammer until it stopped.
Good lesson
lifehacks.stackexchange.com/users/2233/Dave45
Rather than fix the problem why not prevent it?
Close the main valve while working on such a critical pipe.
You wouldn't want to get the water to come into contact with electrical sockets and the like, would you?
Nobody in your house should miss the water for those 15 minutes you're working on the pipes.
If it's extensive maintenance then you and your family can easily survive a few hours with just a few buckets and/or jerry cans of water and a bit of planning.
lifehacks.stackexchange.com/users/2782/Nathilion
You say "pump" so I'm going to assume you've got a well with a submersible pump (or one of the old above ground pumps, but they're rare these days), rather than city water.
If you have city water, find the main shutoff valve (usually near the water meter in the basement, I think).
Find the circuit breaker on your power panel that controls the pump and turn it off before working on the water.
Ideally, there will be markings on each of the breakers describing (cryptically) what they control.
After you're finished, have a helper turn it on and stay by the switch while you inspect for leaks.
If, for some reason, you really don't want to turn it off while you're working on it, at least locate it so you can run and turn it off before it causes expensive flood damage.
If you have city water, find the main shutoff valve (usually near the water meter in the basement, I think), and turn it off and on as with the circuit breaker.
lifehacks.stackexchange.com/users/1725/Spehro Pefhany
Install an electrical water valve on the water main coming into your home with a remote switch located some were in your living space, preferably centrally located.
If you get a break in line just hit switch and it will shut water off.
Now the benefit of doing this is that you can install water sensors in area of your home that might have a line break and cause serious water damage.
These sensors will detect leak and will cause electrical water valve to shut off.
This comes in handy when you are away.
This is a simple installation and you can use low voltage to operate.
Now the best water valve to use is a electrical latching water valve, that way if you lose your electrical the water valve will stay close.
Better yet use a Hunter Sprinkler NODE100VALVE NODE Single Station Controller with DC Latching Solenoid and
PGV-101G valve operate with a 9 volt battery.
This is a water sprinkler valve, can easily be modified for as a water line break shut off if a breaks happens.
Check it out.
good luck
lifehacks.stackexchange.com/users/13344/Paul R
You can't stop the flow.
Every second you spend fiddling with the pipe is a second the main valve is still open.
Ok, I kinda exaggerated, but in situations like that it's either obvious what you can do
(eg divert the flow to the nearby bathtub) or there is no other way than running for the valve.
lifehacks.stackexchange.com/users/4656/Agent_L
Suppose I completely break a hot or cold water PVC pipe under a sink.  How can I quickly stop/minimize the flow while I go turn off the water flow, at the pump?  Last time something like this happened, I wrapped it in a cloth quickly before running down to the water switch. Lots of water still came out; not a success.
If I break a water pipe, is there a way to stop the flow while I go turn off the water?
lifehacks.stackexchange.com
<water><sink>
lifehacks.stackexchange.com/questions/454
lifehacks.stackexchange.com/users/25/J. Musser
It is generally considered that there is no way to stop the flow unless you can crimp or bend the end of the pipe. However, one potential fix could be to put a piece of plastic, such as a garbage bag, over the pipe. The options are to tie a towel and plastic around the pipe and run to shut-off valve, crimp or bend the pipe to clock the flow or do none of these and just run to the valve. Alternatively you could turn off the main valve before you start working or install an electric valve than can be turned off remotely.
Tie some plastic and a towel around the ruptured pipe and run to the shut-off valve. If the pipe is completely broken crimp over the end or bend it to stop the flow. Try turning off the main valve before you start working. Install an electrical water valve so that you can turn it off instantly if there is a problem. Just run for the valve - you cannot stop the flow any other way.