Is there a group of (paid) researchers that work on M-Theory 24/7,
hoping that someday they'll finally unify physics? Or is it more like
a thing that passionate people do in their spare time?
Virtually all serious physics research is done by full time professionals on salaries funded by grants or the institutions they are associated with, or both, or by full time graduate students in physics. The graduate students have teaching or research obligations or both, get their tuition waived, receive a modest salary, and sometimes are given access to subsidized graduate student housing. A typical physics graduate student who successfully finishes a dissertation and earns a PhD will spend three to seven years as a graduate student, often followed by several one to three year stints as post-docs before obtaining a permanent position as a university or college, a corporation, or some sort of institution or laboratory. Those who get academic jobs with often get a series of one to three year assistant professorships which are not tenured before finally earning tenure and becoming an associate professor, after which with further productivity in research and experience, they are promoted to full professor status.
Lots of people who earn PhDs either never end up getting a job in the field as well, get jobs as low level instructors who have heavy teaching loads, low pay, no tenure and no time or resources for research, or drop out of the field entirely either immediately after getting their PhDs (quite a few go into technical securities trading on Wall Street for big investment banks), or end up teaching physics to high school students, or do one of these things after a few stints as a post-doc or assistant professor, or leave the field to have kids and raise a family after which they may or may not return to active research in the field.
There are passionate people who do it in their spare time, but this is the rare exception and doesn't impact the development of the field very much. I would be surprised if they account for more than 2% of all publications in the field and those papers are disproportionately less cited. Even physicists working outside their primary specialties make up a quite small percentage of all papers and often have papers that are less influential than those of specialists in the field.
Many are professors or graduate students who also have teaching or studying obligations, although some physicists with a big physics experiment collaborations or institutes (many of whom are what are called "post-docs" who have earned PhDs but not held an academic professorship or senior institute fellow position) do work full time without teaching or studying responsibilities.
Senior professors or graduate teaching assistants may teach a couple of classes three or four hours a week each during a semester, with senior professors often having taught at least one of their courses dozens of times before and being assisted by TAs and student graders so that the load isn't too burdensome. Junior professors might have three or four classes of three or four hours a week each semester, have less TA and student grading assistance, and will have to spend more time developing their lectures and lesson plans and labs in classes they may be teaching for the first time or have taught only once or twice before, yet also have much more pressure to do research and get published since universities operate on a "publish or perish" system.
The institutions are mostly funded by governments, big foundations, and charitable endowments of other institutions.
The scope of physics research is also much broader than you imagine. Theoretical physics work in things like M-Theory and fundamental physics (often classed under the umbrella of theoretical high-energy physics) is a pretty small proportion of the total. Maybe there are several tens of thousands of professional physics researchers out there in the entire world, and maybe there are a couple thousand at most who are doing the kind of work you are imagining, broken up further into many subspecialties within that kind of research. The number of people doing pure theoretical M-theory work in particular, probably numbers in the several hundreds, maybe 1% of all professional research physicists.
Lots of collaborative work and exchanges of ideas in subfields is done via the Internet supplemented by annual conferences each year in that specialty. In addition to teaching and researching, most mid-level and senior professional physicists spend a fair amount of time trying to get grant money and organizing and attending conferences. Conference presentations are often a way to beta test an idea and get some kinks out of it before trying to publish it in a peer reviewed scientific journal (and participating in the operations and peer review process of scientific journals is another thing that most professional physicists at the mid-level to senior level do some of the time).
Also, obviously, physics researchers are human beings who sleep, spend time with their families, eat, have fun and even take vacations now and then, so almost no physics researchers truly work "24/7" on anything.
How is this actually being done?
Physics research is broken up into many highly specialized subcomponents that use very different methods.
High energy physics experimentalists are part of large collaborations around particle accelerator experiments who are further divided between people who design and operate the machine itself, people who come up with ways to filter the data to address particular questions, people who model what the expected results of an experiment are in both the Standard Model and alternatives to it, people who handle statistical issues like margins of error and the statistical significance of results, and people who manage the entire enterprise and focus on keeping it funded.
Another area which works with smaller collaborations organized in a somewhat similar way is astronomy where each telescope or group of telescopes (using the term broadly to refer to all kinds of astronomy observation tools from gravitational wave detectors to neutrino detectors to optical detectors, to radio telescopes, etc.) have a collaboration within which some people who work on designing and operating the machinery, others on deciding what to look for and how to filter the data to look at it, and still others who sift through it.
The first two tend to be academically or governmentally funded and are pursuing basic research.
Solid state and nuclear physics collaborations are often corporate funded and oriented not towards discovering new fundamental laws of physics, but to understanding complex systems in a practical way, often in a university or corporate laboratory. These project may have one or two lead investigators with post-docs and graduate students assisting them on experiments that can fit in a large room in an industrial or university science building. This can be a mix of research and development of technology and often takes a real flair for operating and fabricating precision instrumentation. Physicists in corporations have job titles like "physicist" or "senior physicist" with less prestige, but often have better salaries and benefits, because their work can be related directly to corporate profits.
The group that your question alludes to is generally known as theoretical high-energy physicists. They usually are professors at universities or fellows at institutes like the Perimeter Institute in Canada or the Santa Fe Institute in New Mexico who basically sit in their offices, confer with a handful of colleagues, and try to come up with new theories or discuss variations on existing ones. Their lives are similar to that of academic mathematicians, except that these theoretical physicists keep abreast of what the experimentalists and astronomers are observing in the real world and calibrate their own work to be consistent with those observations. These theoretical physicists tend to work either individually or in much smaller collaborations and typically have only a small number of graduate students or post-docs working under them (often only one or two). There aren't may grants available for basic theoretical physics research, but from a university's perspective they are just as good at teaching undergraduate and graduate students to generate revenue to subsidize their research activities and are by far the cheapest physics researchers to support because beyond their salaries, they work in small offices that universities have already paid for and need only minimal equipment and support staff.
Between the experimentalists and those 'pure' high-energy theorists sits a broad array of physics researchers who work in small teams to program models to run on high powered computers that simulate physical systems. For example, lattice QCD researchers apply the Standard Model laws of physics involved with the strong force and simulate interactions according to those laws using discrete numerical approximations of those laws which are too hard to solve analytically. Other physics researchers of this type simulate turbulent air flow, calculate quantities in the Standard Model with known difficult equations to high precision, or run simulations of the evolution of the universe with large number of particles over billions of simulation years. Sometimes theoretical expectations in high energy physics experiments are simulated thousands of times rather than calculated analytically to produce a Standard Model prediction to compare to actual experimental results.
In addition to those, within particle and high-energy physics, between the 'pure' theoretical high-energy physicists and the computational physicists, there are also theoretical researchers who focus their research on trying to come up with more efficient way to compute results from existing physics theories or toy model approximations of them. Those who do this within quantum field theory are sometimes called "amplitudologists."
Obviously, this list is not exhaustive. There are many other categories of physicists and many other kinds of physics research modes than those that I have mentioned here.
In each specialty, physicists not only do their own research but also read papers by other physicists whose work is relevant to them but that they don't do themselves. For example, theoretical physicists who work on issues in general relativity and cosmology read key subsets of astronomy research even though they don't do astronomy observations themselves.
Science journalists and passionate lay people like myself, do a lot of the same reading of scientific journal papers and digesting them for more general audiences that professional physicists do, but without themselves doing a significant amount of original research other than perhaps providing feedback to the authors of a preprint on one or two discrete subpoints that they've identified (perhaps an error in a calculation, or awkward phrase from someone not writing in their native language, or an omitted or inaccurate citation) in a manner similar to that of a peer reviewer.