Hi, I'd like to help you with your question.
You are asking two very good questions! Good friends are essential to our wellbeing.
I believe that to make good friends you first have to be a good friend. The core of being a good friend includes some basic points, but very important points, for both people:
First you need to feel positive about the relationship. That means about yourself and about the other person. It is difficult to be friends with someone you have a poor view of.
Two, you need to communicate well. Good friends can talk about most things. But being quiet together is also important. It shows a level of comfort and companionship.
Three, trust. If you cannot trust that your friend is going to keep a secret or be there for you (and the other way around), then you will not be able to maintain a friendship for long.
Four, listening. Both people must be able to listen to the other. In order to feel like we matter, we need to feel others are willing to listen to our thoughts and feelings. Expressing them is important to connecting well. But if we find ourselves always listening and not being heard, it can become a one sided relationship. That leaves room for resentment.
Five, give each other space. Let the other person be themselves. Allow them to have other friends. You are not married to each other so you need to trust that you will be friends regardless of who else you have in your life.
Six, loyalty. What I mean here is that when you tell your friend something important to you, they are able to be there for you at the level you need. They don't brush you off, and they stick by you in an argument or conflict. That does not necessarily mean they agree with you, but to others they are by your side supporting you.
You can also use these points to tell when your friends are real. If your friends continually hurt you and damage the relationship, then they are not real. If you find yourself feeling uncomfortable around them or they seem like they are using you for a purpose, then it's not real. Use the above points to test the relationship. If your friend is able to respond fairly well, then it probably is a good and real relationship.
I hope this has helped you,