'Have' cannot be used in the continuous form when it means 'own' or 'possess'. So, you must say 'How long have you had (owned) your car?' 'Do you have a pet?' 'I have a lot of friends'. This is because 'have' with this meaning is a stative verb - it describes a state or condition.
'Have' can be simple or continuous when it is an active verb - it describes and action. This is seen in expressions such as 'have a coffee', 'have a good time', have a shower' and so on.
e.g. 'They are having dinner' - describes the action of eating. 'My neighbours are having a party' - describes the actions of dancing, listening to music, eating, drinking, etc.