How do you use "have had", "had had", or "has had" grammatically correct?
'Have' can act as an auxiliary verb and as a main verb. As a main verb 'have' can be the equivalent of 'eat', 'drink', 'enjoy', 'experience' etc.
E.g.: 'I have my breakfast.' - simple present tense just like 'I eat my breakfat'.
'I have had my breakfast.' - present perfect tense as in I have eaten my breakfast.
'He has had his breakfast'. - present perfect tense with a third person singular subject as in 'He has eaten his breakfast.
'I had had my breakfast.' - past perfect tense as in 'I had eaten my breakfast.'
Here, the fist part of the verb phrases have/has and had are auxiliary and the second part had is the past participle form of the main verb have.
am/is/are/was/were having = am/is/are/was/were eating.
do/does/did not have = do/does/did not eat.
You have to use "had had" if something has been done long back, not recently. But if something has been done recently, then you can use "have had" or "has had" depending on the pronoun. For example,
I have had a good lunch this afternoon.
He has had his bike repaired last month.
More on the usage, you can refer the below link.
The present perfect form of have is have had.
‘Have you had your breakfast?’ ‘I have had a cup of coffee, but I haven’t had anything to eat yet.’ I haven’t had any rest since morning. The past perfect form of have is had had (had + past participle form of have).
The past perfect tense is used when we are talking about the past and want to refer back to an earlier past time.
She felt marvelous after she had had a good night’s sleep. They dismissed him before he had had a chance to apologize.