To "make fun of something" is to treat something as a joke, something that ought to be laughed at. Making fun of things is generally not considered a problem.
To "make fun of someone" is used in the same sense as mocking someone. However, many people use the idiom as a lighter version, not meant to be as vicious as let's say, ridicule. The problem is that not everyone will take it as a lighter version. What the listener hears can vary.
Example: Denise was making fun of Jane's habit of arriving late to work due to accidentally oversleeping.
Here, Denise is amusing herself about a thing that is not treated as something truly serious. If it is not truly serious, Jane is probably not going to be fired for her habit, and probably isn't very late.
Example #2: Denise was making fun of Jane after Jane arrived late to work.
In this second example, the emphasis shifts from what Jane did to Jane herself. It is therefore a much more personal criticism that could be easily read as making Jane look bad (that is, embarrassing or humiliating Jane in front of Jane and Denise's co-workers).
The problem, such as it is, is that writers could easily use either phrase to refer to the exact same event. Yet Example #1 reads like something much more benign than Example #2.
In essence, the issue is the intent that Denise has. If Denise's intention is to poke fun in a harmless way ("poke fun" is a phrasal verb with a meaning very, very close to "making fun of something"), then it is intended to be friendly. If Denise's intention is to humiliate Jane, that is a different thing altogether, and is not friendly at all.
In a case like this, it is important to understand the effect of word and idiom choice on the tone of the message. In public relations (PR), this could also be called the spin on something.