How does gravity affect a physical clock?
If it has to do something with gravity affecting the inner working of wind up and pendulum clock will this also affect digital clock ?


As astrosnapper noted in his comment, gravitational time dilation affects all time-dependent processes. This includes not only clocks (including digital clocks and atomic clocks), but also the rates at which chemical reactions and radioactive decay occur, measured relative to the equivalent process far removed from the Earth's gravitational well.

General relativity is a descriptive theory. It describes what happens, but not why. (Newton's theory of gravitation similarly was a descriptive theory.) What happens is that time flows slowly in the vicinity of a gravitational source compared to how time flows well away from that gravitational source. The time dilation is a function of gravitational potential energy, not gravitational acceleration.

If you want an explanation regarding why this happens, the answer is no one knows. As noted above, general relativity is a descriptive theory. It explains what will happen but it does not explain why.