Each battle uses Sands of Time (aka Stamina) to start and has a minimum of 3 stages. In between each stage your team will heal slightly.
You can swap out your Eddie any time before his turn. After swapping you will have 2 turns before you can swap again.
If Eddie dies at any point during the battle you can either leave the battle defeated (receiving experience for enemies killed but not receiving any items) or pay Ironite to revive your team at full health.
TIP: If your Eddie is low on health, it’s a good time to swap!
Video: Tutorial: Battle Basics