Yes. I was wondering too, but I learned when I tried to ask the same quesiion, but the same thing came up except double battle version~!
The first Pokemon you try to replace, you tap it and if it says somthing like "Hydreigon can't be switched out!", then you need to tap a pokemon that fainted to replace, The selected pokemon will be in the same postition as the one you replaced. Same goes for the second pokemon. On the third, you tap it and the game automatically puts that pokemon in the last postition in the battle feild.
Hope this helps...