Things happen. We get distracted, we dive so deep into the city that forget to re-surface in time and…OMG, you accidentally overstayed your visa.
If you are a visitor in Hong Kong and find yourself a day or two late for you date of leaving and have a good reason for the oversight – you may be able to sort it out at the airport as you depart.
If you are a resident and have a reason for your slight overstay (say, you had to stay at a hospital), the Immigration Department may also empathize with the situation.
But, do know that in most cases the Immigration Department takes this matter very seriously and long-term overstayers may be even looking at some jail time before leaving Hong Kong. So do not allow this to happen! The consequences are indeed very serious for your Hong Kong future.