This is a polite phrase that you say to someone that you've just met for the first time at the end of the conversation. It's a bit formal. Some more casual phrases that mean mostly the same thing are:
It was nice to meet you.
Nice meeting you.
How do you decide when to use a more formal phrase or a more casual one to say goodbye to a person you just met?
- If you made a lot of jokes with this person during your conversation, you might use the casual version.
- If you met at a formal occasion where you were all wearing suits or nice dresses, you might use the formal version.
- If you want to impress the other person because they're more powerful and important than you, you can use the more formal version.
- If you think you're going to speak with this person again soon, like when you've been introduced to a new coworker, use the more casual version.
Remember that these are phrases that you say at the end of the conversation. At the beginning of a conversation, there are phrases that sound similar but are a little different:
Nice to meet you.
Pleased to meet you.
"Pleased to meet you" sounds too formal and old-fashioned to me, but some people might use it.