It's a polite and formal way to respond to someone who has thanked you for something. You can use it in many situations, such as:
* After someone thanks you for your help: "Gracias por tu ayuda." "Es un placer." (Thank you for your help. It's a pleasure.)
* After someone thanks you for a gift or service: "Gracias por el regalo." "Es un placer." (Thank you for the gift. It's a pleasure.)
* In response to a compliment: "Me gusta tu vestido." "Es un placer oírlo." (I like your dress. It's a pleasure to hear that.)
It's a versatile phrase that can be used in many situations.