Webb often gets called the replacement for Hubble, but we prefer to call it a successor. After all, Webb is the scientific successor to Hubble; its science goals were motivated by results from Hubble. Hubble's science pushed us to look to longer wavelengths to "go beyond" what Hubble has already done. In particular, more distant objects are more highly redshifted, and their light is pushed from the UV and optical into the near-infrared. Thus observations of these distant objects (like the first galaxies formed in the Universe, for example) requires an infrared telescope.
This is the other reason that Webb is not a replacement for Hubble is that its capabilities are not identical. Webb will primarily look at the Universe in the infrared, while Hubble studies it primarily at optical and ultraviolet wavelengths (though it has some infrared capability). Webb also has a much bigger mirror than Hubble. This larger light collecting area means that Webb can peer farther back into time than Hubble is capable of doing. Hubble is in a very close orbit around the earth, while Webb will be 1.5 million kilometers (km) away at the second Lagrange (L2) point.
How Far Will Webb see?
Because of the time it takes light to travel, the further away an object is, the further back in time we are looking.
This illustration compares various telescopes and how far back they are able to see. Essentially, Hubble can see the equivalent of "toddler galaxies" and Webb Telescope will be able see "baby galaxies". One reason Webb will be able to see the first galaxies is because it is an infrared telescope. The Big Bang caused the universe (and thus the galaxies in it) to expand, so most galaxies are moving away from each other. The most distant (and thus youngest) galaxies are moving away so quickly that the light they emit gets shifted towards the red end of the spectrum. This is very similar to listening to a train whistle shifting from higher to lower frequency as it passes by. Because visible light from faraway, quickly moving, “high redshift” galaxies is shifted to the infrared, infrared telescopes, like Webb, are ideal for observing these early galaxies.