what exactly does a research supervisor pay for PhD student funding? Why do supervisors normally tell potential PhD students that they don't have funding, hence they can't accept students? does that mean the stipend? I thought stipend is paid through the department?

could someone clarify for me.
Depending on your country, there may be different kinds of funding, including positions where you're an employee of the university/state/country. Such positions are usually owned by an individual professor. This is different from other funding sources that are not owned by individual professors, like stipends.

So, when you ask a professor if you can be her PhD student, without specifying a funding source, she may assume you're asking if she has a funded position readily available. In this situation, the answer is often no.

In addition, "no funding available" can also be a polite way of declining, if there are actually other reasons for saying no.