Like they're coming up with all this stuff about atomism and whatever (which I'm reading about now and it's fascinating!) and doing all this experiments and hypothesising and postulating all the time, how did they get money to live? And did these men of science live, like kings, celebrities or peasants?
Every individual was different, but many ancient philosophers taught students and either charged fees or accepted donations. Others had rich patrons. The most extreme like the Cynics begged a bare minimum of food to survive. Diogenes famously lived in a jar. (Corrected by /u/MortRouge ) But some might have been independently wealthy. It was not unheard of for rich people to leave large sums of money to philosophers in the Roman Empire, for instance.
This is a later time period, but you might be interested in Epictetus’ Discourses. These were transcribed talks with his students, sometimes peppered with their questions and his answers (and sometimes his metaphorical questions and answers). Although most of it is about his Stoic philosophy, occasionally he talks about making a living as a philosopher.
Many struggling philosophers worried about money, like finding a patron. Here Epictetus is basically telling his students not to sweat it.
Whether I have a patron or not, what is that to me?
Epictetus, Discourses, III.9
Sometimes they were quite ingenious in their efforts to find a patron. Not only was it difficult, it could be dangerous, though:
You may find yourself approaching a senator, someone with money, and asking him: ‘Do you know, sir, to whom you have entrusted the care of your horses?’
‘I do.’
‘Is it some random person with no knowledge of horses?’
‘Of course not…’
‘So, then, tell me the steps you’ve taken to care for the soul… surely you would not casually look on and allow the most prized of your possessions to be neglected and go to ruin… if you have looked after it personally, did you learn how from another person…?’
At this point you run the risk of him saying, ‘What business is that of yours, sir? What are you to me?’ Pester him further, and he is liable to punch you in the nose. I myself was once keen for this sort of discourse, until I met with just such a reception.’
Epictetus, Discourses, II, 12.
Famous philosophers often had many pupils and were much respected, but Epictetus warns his own students that this does not necessarily mean he was a good philosopher.
What is the work of an honourable and good man? To have many pupils? By no means.
Epictetus, Discourses, IV.8
In another passage one of his students wants to quit and go home. Epictetus argues against this from a philosophical standpoint, but it isn’t out of the question that he didn’t want to lose a paying pupil.
‘I am ill here,’ said a student, ‘and want to go home.’
Because you were never ill at home, I suppose?...
‘But my mother won’t be here to hold my head while I am ill.’
Well then go to your mother. You deserve, in fact, to be held by her whenever you’re ill.
‘But I had a nice little bed to lie on at home.’
Go to your nice bed, then; sick or well you deserve to lie on a bed like that… What does Socrates say? ‘One person likes tending to his farm, another to his horse; I like to daily monitor my self improvement.’
‘In what? Little phrases?’
Hush.
‘Clever theories, then?’
Don’t be absurd.
‘Well, as far as I can see, philosophers don’t busy themselves with anything but.’…
Which of you has the same attitude [as Socrates]? If you did, you would gladly put up with illness…
Epictetus, Discourse, III.3
Although Epictetus was a conventional philosopher with a school and students, he speaks in admiring terms of Cynics, who basically had nothing and lived only through meagre donations. This was kind of an ideal among many philosophers, and when one student asks him about it he describes the lifestyle:
I will go about and begin to beg and to abuse those whom I meet…
Epictetus, Discourses, III.22