While there are certainly a number of edited space pictures floating around the internet, there are also a lot of real pictures like what you describe. The most famous of these tend to be of the Orion Nebula - it’s a very beautiful nebula (along with being scientifically fascinating), so lots of people - both professional astronomers and amateur astronomers - have taken pictures of it. (The Trifid Nebula is another common target.)
Why are there so many stars in these pictures? Almost all of the gas (and most of the stars) in our galaxy is contained up in a very thin disk - proportionally, the Milky Way is thinner than a razor blade. This means that all these nebulae - which are clouds of glowing gas - are also found within this very thin disk. If we look towards them, we are looking through the disk towards the greatest concentration of stars in the sky. The thousands and thousands of stars captured in these images are just the handful of the stars in our galaxy that happen to be in the same direction as the nebula. The fainter the nebula you’re trying to observe, the more stars you’ll capture.
These nebulae can be imaged either from the ground or from space - it depends on what we need the pictures for. The pretty Hubble images you see are usually not the main goal of pointing Hubble at that patch of sky - scientists are usually concerned with how much light there is of a certain colour in a certain region, and whether or not there is more of a certain colour than a second color - these differences in colour can help us understand the structure of the nebula, and how warm or cool it is, along with a number of other properties. This information can be used to make a colour image of the nebula, but it often isn’t done right away, or at all.
If, however, you’re simply wanting to make a really good-looking picture of a photogenic patch of the sky, you would do that from the ground. There are so many things that only space telescopes can do, that we can’t spend much (or any) time just to get good pictures. But on the ground, your time is less constrained, and a lot of amateur astronomers have their own telescopes and cameras attached to them, so they can just go out and take pictures whenever the sky is dark and clear. In this case, these detailed pictures are taken over a long period of time, to make sure that there’s enough time for the light from all those stars to reach the camera.
Most nebulae are too faint to be seen with the naked eye - but the Orion nebula is a notable exception. If the constellation Orion is up, look for the middle “star” in Orion’s sword - it’s actually the Orion nebula. In a very dark sky, it might even look a bit pink.