Is ripples in frequency response of a filter ,result of periodic extension of a signal in time domain thereby producing discontinuities? I am aware that due to gibbs phenomenon, ripples are induced at the vicinity of transition in the frequency response of a filter and ripples occur in frequency domain when there are discontinuities in the time domain signal.

Now my doubt is how and why discontinuities are present in time domain signal?

Is it due to periodic extension of aperiodic signal in time domain to compute DFT?

please correct me if I am wrong in my understanding and provide an explanation.

Thanks!!
It's mostly related to what's called the uncertainty principle of the Fourier Transform: "the more compact a signal is in one domain the more spread out it is in the either". A sharp transients in the time domain has a wide spectrum. A sharp transition in the frequency domain has a long time domain ringing. See for example http://www.ams.org/samplings/feature-column/fcarc-uncertainty