When and where to use references?

What exactly is the importance of referencing? And in what portions of the thesis should you use references/in-text citations??

I am new to this whole concept of writing thesis and these points were just bugging me a bit, because I can’t really find much references. Everyone seem to emphasise on including references but actually, I am not that aware with its significance. Any inputs for the same?