UI is all about the appearance, feel and interactivity of the product. Every interactive element that user encounter is considered in UI design. Buttons, icons, typography, spacing, design etc are all included in User Interface Design. UI ensures that a design is wholesome, coordinated, consistent and aesthetically pleasing.
The process through which interaction between user and product is improved and developed is called user experience design. It does not relate with the visuals but overall experience of users. The sole purpose of UX is to create streamlined, efficient and pleasant experiences for the users.