Visual design as a part of UX
Visual design involves interface design: using colors, typography, images, icons and layout to create an interface that matches a visual identity and what a user expects graphically. This allows you to convey information and emotion well. More importantly, this ensures that the interface works well.
Not separately
You can't separate this graphic piece from the UX. How a user experiences a digital product is very much related to its appearance, but especially to where you as a UX Designer put the emphasis. So it goes far beyond "pretty," because that's subjective. For example, clickable elements should stand out well. With good visual design, you make sure that the interface works for your user. And that user goals can be successfully achieved.