Since tax and trade agreements differ widely between different countries, the only thing we can address directly is your example - USA and India.
The United States charges a 30% flat tax rate for all foreign entities receiving income from a US entity. This rate may be lower if the foreign country has a tax treaty with the United States, which India does (10-15% is the tax rate in this case). In order to qualify for this treaty tax rate, a foreign person or corporation submits a W-8BEN to the US entity paying the income. The foreign entity must also file Form 8233 with the withholding agent to claim a tax treaty exemption on any personal service income. “Dependent Personal Services” or “Government Services” articles may provide an exemption for wages. The foreign employee may also be required to file a W-4.
Description of US flat tax rate and the purpose of the W-8BEN
US-India treaty tax rate and additional information specific to outsourcing to India
MUST READ - IRS PDF describing employer/employee responsibilities for witholding taxes on wage payments to foreign persons
The payer (in this case, the US company employing the foreign individual) pays the specified taxes directly to the IRS; as near as I can tell, this is withheld from the paycheck the same as with a US employer and US employee. The foreign recipient is also still liable for tax in India.
As the foreign employee, your employer would typically be very meticulous about filing all of the appropriate tax documents, so as an employee you can probably rely on the US employer to make sure it's all done correctly.
Not all kinds of outsourcing are subject to this tax information. Certain kinds of employment, contracts, purchases, our outsourcing may qualify as trade or some other international agreement rather than employment, for which other tax laws will apply.
For employers located in countries other than the USA, you'll have to research their particular tax laws. The same for employees located in countries other than India. EU countries may not have consistent tax laws and there may be EU taxes in addition to, for example, France or UK taxes. Likewise for the USA, different states may also have applicable tax laws.