A lot in this one ;-)
I think 'had better' is used to mean 'should' or 'must' for examples:
I had better go = I should/must go.
She had better be here by 10 PM = She should/must be here by 10 PM.
'had' here is not used for 'perfect tenses'. It's not correct to say 'I had better gone' ;-)
Sometimes, 'had better' gets abbreviated (said quickly) to 'd better' eg. 'I'd better go'. This usually easy enough to understand and not confused with "I'd go = I would go".