Telecom operators have roaming agreements with each other, for example, consider that you are a subscriber of Airtel in India and you visit Brazil. Then Airtel India would have made agreements with any operator in Brazil for such roaming subscribers say with TIM Brazil. So the moment you switch on your mobile phone upon reaching Brazil you would be connected to TIM's network as a roaming subscriber. Your profile would be sent from the HLR in your home country (Airtel India in this case) to the VLR (Visitor Location Register) of TIM in Brazil. Then Your usage will be simultaneously tracked by both the sim providers. And to ensure a good experience both network provider companies will charge you with an extra service charge. That is why you will see expensive international roaming plans most of the time.