A domestic customer is supplied at 240Vac by a power utility company he has his power cut due to load shedding
during the time when he is off supply he decides to connect his portable generator AC generator,240Vac or 380volts. When the power from the Utility is restored, his generator does not come out automatically. The customer gets his appliances all burnt or damaged. The question is what caused the damage of appliances in this instance?

Any generator must have a transfer means that disconnects the load positively from the outside power grid before the generator provides power to the load. That can be an automatic transfer switch (ATS) or a hand operated one which the home owner toggles from grid power to private generator power with a gap between the two (break before make double throw).
Omitting that switch violates the electrical codes and can cause the death of power company workers who assume the outside lines are unpowered while they are making repairs.
Physically if an unsynchronized generator were to be put in parallel with the grid it would be destroyed as it attempts to synchronize itself instantly with the external power. Its shaft would try to change to the speed required for the synchronization and would be twisted off by the "infinite" power of the power grid.
As the generator remained connected to supply source, it got fed by the utility company supply.This generator is naturally not sysnchronised with utility supply (voltage,frequency and phase angle of both the same), the result is overvoltage / overfrequency to the generator and it got burnt.
Is it 240 or 380 volts AC?
Assuming 240, then the problem is due to the difference in frequencies. If your generator is running at 49Hz and the power company is running at 50Hz, you will get a 1 Hz difference, which causes reinforcement sometimes and cancelation other times. During the reinforcement you can have twice the 240 volts, which can cause lots of damage.
Or the difference could be 0.1Hz and you would still have problems.
Surprised your generator didn’t get burned out.