It seems your are talking about Welch's method to estimating the Power Spectral Density (PSD), which uses overlapping windows to reduce the noise. The disadvantage is losing some frequency resolution, which can be an issue for certain application.
Check out the wikipedia page of Welch's method: https://en.wikipedia.org/wiki/Welch%27s_method
And here is the mathworks page for the pwelch function, with examples: https://fr.mathworks.com/help/signal/ref/pwelch.html