UI is a small part of UX to some extent. However, UI design focuses more on colors and typography. Let’s pick a textbook example. If there need to be a button, UI designers will concentrate on the visual part. Namely, how the button will look like and what color to use, while UX designers are trying to figure out where to put it with the intention to find what users want and the resolutions to those pain points. So next time if you hear something like“building great user experiences with Silver light 4” or“Mastering HTML5, CSS3 and Jquery to implement stunning user experience”, you can just laugh it off or boo them if you want to.
If you think the definition is too hard to understand, it’s be summarized as 3 points. Maybe you can understand well.
Hope my answer is useful for you! BTW, if you’re a UI beginner or want to learn Ui. Here is an article that you have to read: How to Learn UI Design From Zero-Basis.