Is the James Webb telescope going to orbit around the earth? If it’s going to orbit around the earth, what kind of orbit would it be (what distance)?
Are there benefits to sending a telescope further away from the earth if it’s just to photograph galaxies and not objects that are in our solar system?
Your first question - is JWST going to orbit Earth - is a little complicated. It will follow a mission profile that will send it to the Sun-Earth $L_2$ Lagrangian point. It will take the telescope about three months to achieve its orbit in $L_2$. Now, $L_2$ is unstable, and so some station-keeping - essentially, course corrections by thrusters - will be needed. It won't be orbiting Earth, but orbiting the Sun with Earth, in a nearby location.

You're not quite right that JWST will only be observing objects outside the Solar System. Some of the most exciting targets - young, evolving galaxies and exoplanetary atmospheres - lie far beyond. However, the telescope's capabilities for atmospheric analysis (thank you, NIRSpec!), useful for determining the composition of exoplanetary atmospheres, will also be used for observations of the atmospheres of Mars and the giant planets, as well as compositional data for other bodies.

Now, it's not really helpful to send JWST elsewhere in the Solar System, given that most of its observations will be of objects outside the Solar System. Okay, maybe you could get higher-quality data on Mars if you sent it to Mars orbit, but that would be quite costly, and not effective for a spacecraft designed to be used by many scientists for a number of purposes. Keeping it at $L_2$ simplifies the orbital trajectories immensely, although it's still much too far away to repair, unlike Hubble. You also lessen the communication time.

Well, you might say, why not just launch JWST into Earth orbit? We have scientific instruments there; why do we go to the trouble of putting so many things at $L_2$? It turns out that debris high above Low Earth Orbit (LEO) would be too dangerous for the sensitive optics on the telescope. The best instruments are often also the most delicate, and JWST would be damaged if it was truly orbiting Earth, at LEO or elsewhere.