When do we use "has had"? Is it a past perfect tense?
No. Has had is a form of Present Perfect tense.
Has had (or generally have/has + Past Participle) is a form of Present Perfect (Simple) tense. You use Present Perfect tense to talk about past events which are already over but have influence on the present.
I have lost my keys.
This sentence not only tells us about past event (losing my keys) but also indicates the connection between past event (losing keys) and present situation (I cannot open/close the door because I haven't keys)