If you have a "good sense of humor" they think you are funny and you know what is funny, someone else may say you have a "bad sense of humor" that means they don't think what you say is funny.
The others gave great answers. I wanted to add what a sense of humor isn't. It isn't "being able to take a joke" if you are the butt of the joke. Many people poke fun, and make jokes at others expense and then say they have no sense of humor.