An emotional affair is when you develop an emotional connection that becomes primary to your well being that takes away from your relationship with your partner. It may or may not include physical touch and/or sex; it may or may not include "cyber" sex. A sexual affair may or may not include emotional closeness or emotional needs being met.
How do you know if you're having an emotional affair? Ask yourself the following questions and then decide:
What's missing in my relationship with my partner? Did those needs once get met with my partner? Am I now getting those needs filled by someone else?
What is the meaning of this other person to me?
Is the other person a secret?
Did it begin with your partner knowing of your friendship and move into being secret or parts of it being secret?
Is your satisfaction with your partner decreasing or being called into question?
Do you tell yourself that the other person "really gets me"?
Are you finding ways to justify (to yourself and/or your partner) your relationship with another person?
There's no set answer or number of those questions that you answer "Yes" to that tells you if it's an emotional affair.
I've worked with people that don't realize they're in an emotional affair until it's gone pretty far, and some damage has already been done. That's why I've listed a few warning signs above. That doesn't mean you can't repair your relationship with your partner. It does mean you will need to give up the emotional affair partner.
Ask yourself if you have unmet needs in your primary relationship. What are they? How can you approach your partner and discuss your feelings?
One of the issues I see most often in couples counseling is that you interpret meaning very differently than your partner, and you assume that a certain action means the same to them as it does to you. It doesn't! Even if you're a lot alike, or think alike, or you have a long history, meaning is individual. Meaning comes from your earliest life, your genetics, and your experience so far.
One of the most important questions you can ask your partner is: "What does that mean to you?" Then listen without thinking how you are going to answer. Be curious. Say, "Tell me more about that."