Let's say we've built a machine, that prints a sequence of all natural numbers from 0 to $\infty$. We "could" do this in a Universe with an infinite amount time (if we also make many other assumptions I don't want deal right now with).
No. You can't ever build such a machine. You machine has a finite number of parts that can be arranged a finite number of ways, so there is a finite number of numbers it could print out.
What if we would like to do the same experiment, but this time we print the real numbers?
That doesn't even make sense. Again, you can only print numbers that have a finite description, the describable numbers. And mathematicians would describe that as a mere small (and boring) subset of the real numbers.
The two infinities (the amount of all natural and real numbers) are very different in nature.
The natural numbers and the describable numbers aren't that different, one is an encoding of the other. The alleged undescribable numbers are different.
They are pretend.
One is bigger than the other.
You can't say a pretend thing is larger than something else. And even mathematicians don't say one is larger. They instead talk about an abstract partial order (a reflexive, transitive, antisymmetric relation) that bears similarities to size comparisons and then they use isomorphic (correspondingly similar) language.
And if you tried to claim one was actually bigger, what do you do about the downward Lowenheim-Skolem theorem? Question beg it by assuming larger things in your language or logic? And what's the point if one collection is full of pseudoscience (the undescribable numbers are by definition never going to be seen).
If one says the Universe will last forever, does by "forever" he mean the amount of time that can be counted by the first machine, which prints a number, for example, every second?
We mean that for any region of spacetime and any level of accuracy there are models that agree with observations in that spacetime up to that accuracy and that for any describable number D there regions of spacetime such that the corresponding parts of the model have time like curves that extend from that region to have a proper time that exceeds D.
And we could have used just the naturals or just the square numbers or any unbounded sequence. Or you could just say the proper times that curves extend are not bounded.
In science you never have to bring up fictional alleged undescribable numbers since be definition they don't actually show up in either a theoretical prediction or in an experimental observations.
They can be safely confined to storytelling about the mathematical models. Which is fine, if having them makes it easier to talk about the models, then have then if you want. But they aren't where the important things happen. The can't be, they never will be, and they were merely alleged anyway.
Or by "forever" he means some continuous line where time is not something you can quantize?
When a physicist says continuous and a mathematician says continuous they aren't talking about the same thing. A physicist is contrasting models, and so is distinguishing models with discontinuities from models without such discontinuities. The physicist isn't worried about which numbers exist beyond the ones that are needed to make the predictions.
Or is the "physical infinity" something very different from mathematical?
Yes. The physical one is agnostic at best about alleged numbers that are never actually seen.
I probably do not understand the concept of time whatsoever,
Fundamentally you should learn what an event is. That is the proper unified generalization of a moment and a location. Then you can learn about durations, which is a generalized length of curves made up of events.
because I think it might have something to do with "events occurring at a specific rate relatively to some other events occurring at some other rate".
No, its just a length. Just like a space has a length of a curve, so a 4d spacetime has a generalize length associated to a curve in 4d and that is duration. And in general they don't have a super close relationship to any naive notion of time or duration in particular that everything is comparable. A length of a curve is a length of a curve and it is pretty unrelated to other curves which have their own lengths.
If there are no events (for example the Universe "dies", "cracks" or whatever), there is no time then and no sense of measuring it (either by counting its "seconds" or stating it's a continuum).
If there are no events there are no questions to ask and no universe. Either do physics or do not, there is no try.
But I would really like to know what does a physicist mean, when he uses the word "infinity" when he's talking about time related to the future history of our Universe.
Not bounded.
is it really the case you can't get for example $\sqrt{2}$ in a theoretical prediction or in an experimental observation as an actual value? What about rational numbers?
You can describe the natural numbers. You can describe the integers. You can describe he rationals. You can describe the algebraic numbers (which includes $\sqrt 2$ and every other zero of a polynomial with integer coefficient). And that's all still countable. But you can describe more. You can describe $\pi$ you can describe $e$ you can describe any computable number (one with a finite program for a fixed Turing Machine that takes an arbitrary natural number n as input and then prints the nth digit of the number). You can even describe some uncomputable numbers such as Chaitin's constant, the number between zero and one whose nth binary digit is zero or one depending on whether the nth program for a fixed Turing Machine ever halts or runs forever.
The describable numbers contain any specific fixed number that could ever be described with a finite description. And it can get a bit fussy to nail that down exactly and precisely. But if the number can be described clearly enough that there is an obvious and objective answer to what its digits are, then that roughly means it is describable.
What it does not include would be numbers with random digits. And since you can list the descriptions, a mathematician will say that "most" real numbers are indescribable. But they are also pointless for science. They don't come up in specific predictions, they don't come up in specific measurements or in specific observations. They can't be specified in a procedure so that a specific protocol can be repeated.
What a mathematician calls the real numbers is supposed to be vastly bigger and more more complicated than what can be described. But obviously they can't exhibit a single example concretely, they could try to assert that there is a number between zero and one whose binary digits encodes a belonging relationship on the natural numbers that satisfies the ZFC axioms. But firstly we don't know if such a number exists. Secondly they can't actually prove it exists. And thirdly, even if such a number exists there are many such numbers and they still haven't described a single one of them.
The indescribable numbers are allegedly vast but we've never seen a single one and we never will. And we don't actually need them. If pretending they are there makes things easier or more convenient, maybe they are harmless, like a ghost story. But if you start to worry about them like they matter, then this is a sign of a deep problem or that you have waded into pure nonsense and you should go back and learn from your mistake. Just as if you started to worry about specific ghosts as if that was affecting your experiments. The fiction should have been harmless and convenient or you shouldn't have done it at all.
If your number has digits and you can describe them all and a describable specific order in some finite description then its a perfectly fine number. And there aren't oodles of those numbers.
We don't need numbers to act as Oracles, secretly knowing and pre-encoding mystically unknowable outcomes by an unknowable non procedure.