How can the universe be infinite?
Well it can't ... in both size and age. The universe MUST either be finite in age or size (or both) because the night sky is dark. Since the discovery of the big bang, we have considered the universe to be finite in age, it is estimated to be 13.82 billion years old. Since it is finite in age it CAN be infinite in size, but we don't know for sure.
How do we know the universe is finite in size or age, it's called Olbers' paradox or dark night sky paradox. I'm sure you've noticed that most of the night sky is dark with stars spread around.
If the universe was infinite in size, it would have a infinite number of stars in it, of various distances from the Earth, some closer then others. In a universe of infinite size there MUST be a star in every possible direction, because if you go far enough back you'll hit one.
Light has a finite speed, it takes a little over eight and a half years for the light to reach us from Sirius, the brightest star in the sky. If the universe was infinite in age there would have been time for the light from stars from every part of the universe to have reached us, this would make the whole sky uniformly bright in all directions (note wiki has a BEAUTIFUL gif illustrating this). The sky is not bright in all directions, so the universe MUST be either finite in age or size.
How do we know the universe in finite in age? Hubble, who worked on studying galaxies noticed that in all directions of the sky distant galaxies all seemed to be moving away from the Earth, it was also noticed that the further away a galaxy, the faster it was moving away from us. Working backwards, there was a time when all or these distant galaxies were at the same point, the big bang, the beginning of the universe.
Currently the best evidence for the big bang is the comic microwave background (normally shorten to CMB), a weak radio glow in all directions of the sky. When everything was all together, the universe was denser and hotter and it glowed brightly. You can see the last moment of the time when the universe was this hot dense soup, 380,000 after the Big Bang, called "the age of last scattering." The bright glow has spread out and dimmed and is now a background of the whole sky.
The CMB is almost exactly the same brightness and same colour in all directions (here colour is like a radio station frequency, 160.2 GHz) , the whole universe had to essentially be touching in the past for this to be true, more proof of a big bang. There is very very small variations in the CMB, studying them tells us the age of the universe, 13.82 billion years old.
Because the universe has a finite age it can be infinite in size, we actually don't know for sure, but it's possible. Note because we can't see past the CMB that the OBSERVABLE universe is finite, it is 91 billion light-years in diameter, the universe keeps going past that, we just can't ever see it.
note although the answer is long, I'm simplifying/skipping a ton of stuff, there are whole books written about this.