Where do research labs get their funding? I'm just starting out in research and about to finish my BSc. If I stay in research I'm wondering about the economics of it: where does the money come from? I am passionate about a specific field and I want to be able to do research in that area - but I imagine to support that research I'd have to find a lab that has been specifically funded and has projects related to that field, right? And how does the funding for these labs work? Is it mostly project based with 1-2 year length after which the lab has the pressure to submit another proposal to find another project, or does it have less pressure because the lab is also funded by the university?

In essence I'm just wondering about the money flow that is keeping a research lab alive: if I want to do research in X, I'd have to find a lab that has the money to support X right?
Most labs get funding from granting agencies, governments, industry agreements, or private foundations. Some universities also provide funding in other forms.

Now, what they can do with the money depends on the conditions of the grant. Some, are attached to a specific project. They may also include a breakdown of the expenses: this much to hire two PhD students, this block to hire a posdoc, publications, experiments, computers... Some other grants are more open, and may give the PI more freedom to allocate the resources, or to work on sub-projects.

Some areas of research have economical interest, and may lead to patents and industrial agreements, that could help the lab to be less dependent on grants.

Lastly, some students may get their own funding, that may be attached or not to a specific project.

Universities do support labs, mostly by paying salaries of the staff and infrastructures.

Regarding the times, most labs apply to any grant in reach: you can never know if the grant you are hoping for will be renewed; and there is never too much money.