If you are married, or are in a relationship, and you are hugging someone that you have romantic feelings for, then yes, you are cheating. You are touching someone other than your significant other with the wrong emotions in your heart and the wrong ideas in your head. A brief hug is fine, but if this is a long, drawn-out bodies touching almost everywhere hug, then yes, you are cheating. If you got caught doing this, you would pull away immediately. That reaction indicates that you know you are doing something wrong or something that you shouldn't be doing.