In simple words, UI, the user interface is solely refers to the aesthetic elements through which the users interact with your application or product. And, UX, the user experience refers to the experience that a user has with the product or application.
UI designing focuses more on the use of visual elements that elevate the overall look and feel of the application by incorporating colors, menubars, typography, etc. UX on the other hand lays emphasis on the user and his/her journey through the application or product.
The key differences between UX and UI are,
• UI has an artistic component, UX has a social component
• UI deals with interaction quality, UX deals with functionality and purpose
• UI focuses on technical components, UX focuses on project management