Despite what some well-meaning people tell you, there's no law against grabbing a taxi on the Camino until you get to Sarria. From Sarria to Santiago, or from any other route, you must WALK every step of the last 100 kilometers. However, before that, it's fine to hail a taxi if you need one.
Always hail a taxi that is already going your own direction. They will almost never do a U-turn for you.
If they have a client in the seat, they probably will not stop for you.
If they do not have a passenger, they may be on their way to pick one up.
If there is not a taxi in your area, your fare may include the drive to the pick up point. For instance, if you are in Foncebadon and need a taxi to Molinaseca, changes are you will pay the fare for both directions, unless the taxi is already AT Foncebadon.
Your taxi should have a meter. Be sure it is turned on. There are general guidelines for taxi fares and most taxi drivers are very honest. If your taxi does not have a meter, he may be freelancing (or even illegal.) At that point it's up to you if you want to negotiate your fare. If he has and is using a meter, please do not try to negotiate. This is Spain, not Mexico.
Though most fares are set, be sure to agree on the fare BEFORE you get into the taxi. Just ask, "Cuanto cuesta Molinaseca?"
If you are in a village and don't see a taxi, go to the nearest bar or lodging. They will almost always call for you.
As you are walking, keep your eyes peeled for local taxi numbers. You will often find them posted on signs along the route.
The taxi fare is per taxi, not per person. So for instance, if the fare from Foncebadon to Molinaseca is €20 and there are four pilgrims, the price will be only €5 per person. It's usually easiest for one person to do the paying and collect from the others once you're at your destination.
Talk to your taxi driver! They are used to pilgrims, and are often quite friendly and full of information! Many do speak a bit of English.
My favorite taxi service is Caminofacil. They also do luggage transfer and you can book ahead. I often use them for Santiago to Sarria pilgrims:
Teletaxi San Fermin will carry you from Pamlona to SJPP or Roncesvalles:
I use Express Bourricott in SJPP.