Sorta both, I guess? I'm not sure if I can explain this all that well, but, making people laugh, and having them think you're that easy-going silly person may be a point of attraction for some. Except that I may not necessarily be that easy-going silly person.
I usually tell jokes if I'm bored and/or I'm comfortable/don't care enough for said person (if he doesn't find it funny)... plus the latter one is a bit silly considering some people may not be into the sort of jokes you tell.
Either or, depending on the situation... or if I'm bored or frustrated and need to chill out. But, as cheesy as it sounds, making other people laugh is the most satisfying.