Before IPsec can encrypt traffic, the peers must agree on encryption algorithms and exchange keys. IKE (Internet Key Exchange) handles this negotiation.
IKE runs in phases. Phase establishes a secure management channel between peers. Phase uses that channel to negotiate the actual data encryption parameters. Think of Phase as building a secure room where you can safely discuss Phase secrets.