You may already be aware that Totem Pokemon found at the end of island trials very often call ally Pokemon to assist them. This behaviour isn't unique to Totem Pokemon though; after completing the first trial, wild Pokemon may also call for ally Pokemon when they're at low health.
When this occurs, your Pokemon will have to face off against two Pokemon simultaneously, akin to a Double Battle but you've only got one Pokemon. In fact, the same strategies for Double Battles apply here, so moves that target multiple Pokemon will be useful, for example.
Anyway, that's just the surface; below the surface, there's a layer of intricacy that may interest seasoned Pokemon trainers.
So long as there's only one wild Pokemon, there's a chance that the wild Pokemon will call for an ally Pokemon. This chance is increased if the wild Pokemon is low on health and/or you use the Adrenaline Orb item.
Therefore, you can encourage wild Pokemon to continue calling for ally Pokemon by knocking out one of the Pokemon, but keeping one of them standing, to ensure there's only one wild Pokemon in the battlefield. It doesn't matter if you keep the original or an ally standing--both can call for allies.
Which is a bad thing, right? The battle could theoretically go on forever. Well, yes, and this can be bad if you discover you've bitten off more than you can chew. If you want to stop the chain, you can cause a status affliction that immobilises such as Paralyse, Sleep or Freeze.
Actually, it turns out you want to continue the chain. The higher the chain, the more likely you'll find Pokemon with high IVs, a rare Hidden Ability or even Shiny Pokemon! In addition, Effort Value (EV) gain is doubled for ally Pokemon, making EV training a doddle with the right preparation.
You can use False Swipe or Hold Back to refrain from accidentally defeating the Pokemon before it has called an ally and the Adrenaline Orb item to encourage the Pokemon to do so. Afterwards, you can continue using the Adrenaline Orb. Doing so won't do anything, but it won't expend a use.
Can't Aim... Properly...
Like in the past, your poor Pokemon trainer is terribly unfocused and cannot throw a Poke Ball if there is more than one wild Pokemon present. So if you intend to catch a Pokemon while chaining allies, you need to clear away one of the Pokemon first.
Depending on the wild Pokemon that's calling for help and their location, sometimes an ally Pokemon of a different species may appear instead. This can be an evolved version of the original Pokemon, such as Bagon calling for Shelgon or Salamence.
Other times, it could be a completely different beast, like Corsola calling for Mareanie. Some Pokemon can only be found during S.O.S. battles, so be sure to check our wild Pokemon encounter tables!
Additionally, there is a special type of S.O.S. battle that can yield rare and exclusive Pokemon, known as "weather S.O.S.". As its name suggests, it occurs when a weather is in effect, namely rain, sun, hail and sandstorm. During these conditions, certain rare Pokemon may appear as ally Pokemon.
As with regular S.O.S., Pokemon exclusively found during weather S.O.S. are location-dependent on top of weather-dependent. Usually, it's easier to wait for the weather to naturally occur in those locations, but you can use Pokemon moves to create that weather as well.