Some projects come specifically with funding attached to them. Others are not immediately-funded but you apply for it through the university. On the application form you are asked how you will fund the PhD. You are then offered options to be considered for departmental funding, university funding, research funding (and other sources including self-funding). At my uni you can apply for dept, uni and RC funding as a series of stages in the hope that you get one of them.