Original: They then poured the drink back and forth from a cup to a pot until a thick foam developed.
Simplified: They then poured the drink back and forth from a cup to a pot until a foam was created.