Be Interested to Be Interesting
Become genuinely interested and curious in other people and in what they are saying. Show this by being a good listener. Encourage others to talk about themselves by asking thoughtful questions. Acknowledge that you are immersed in the conversation through your body language with eye contact, smiling, and nodding. Be genuine in wanting to make new friends or start a relationship and do not view this as a technique to achieve an end.
Ask many questions to dig deeper with the other person and determine topics that they are truly excited about. Asking questions allows you to drive the conversation. Follow your curiosity - ask more questions about the other person that peel back the layers and are fun to answer, or questions about things that you don't know or understand that the other person does. Ask how or why questions, especially if they give surface level answers, and listen carefully. Find topics of mutual interest.
Avoid talking too much about yourself. This means avoid always trying to relate the other person's story back to your own life with your own stories, or talking about your own aspirations, as this takes the conversation away from them. Wait for the other person to ask you instead, but ensure that you turn it around back on them shortly after. It should be like a rhythmic dance, where the other person should be doing the same. The rhythm creates a fun and engaging conversation.
References
How to Win Friends and Influence People by Dale Carnegie