If you buy the phone on contract - i.e. subsidised by a network - it will almost certainly be locked so that it can only be used with that network (they did pay for the phone, after all).
Once the contract period (usually 2 years these days) is complete - or when you buy out the contract - EU rules oblige the network to allow you to unlock the phone for use on other networks (they are allowed to charge a small fee for this).
You might be better off buying the phone outright from the Play Store, that way you can get take a SIM-only deal with any network, including ones in India.