Your bank sources for the dollars before it can be converted for you.
India
The rate your bank gives you at each point in time is usually a 0.5% to 2.5% mark-up on the spot-rate (the rate you see on Google). The percentage depends on the bank and the volume you are transferring.
Tip: It is possible to negotiate the rates with certain banks like HDFC and ICICI, especially when transferring larger volumes.