When you are having fun, you are having a good time. Watching little kids jump around inside an inflatable bouncy house, you can instantly tell how much fun they're having.
There is no mistaking fun when you're having it, and it's generally used to mean exactly what it sounds like, some activity or experience that's purely enjoyable. When fun takes the form of an adjective, it's informal, not strictly grammatically correct. So while you can say, "Being with her is so much fun," you can't correctly say, "She is such a fun girl." Fun turns a little bit mean when you're making fun of, or teasing, your friend. In this case, it might be fun for you, but it's probably not very much fun for him.