As Rahul Varshney, co-creator of Foster.fm puts it:
"User Experience (UX) and User Interface (UI) are some of the most confused and misused terms in our field. A UI without UX is like a painter slapping paint onto canvas without thought; while UX without UI is like the frame of a sculpture with no paper mache on it. A great product experience starts with UX followed by UI. Both are essential for the product’s success."
UX design stands for 'user experience design', while UI design stands for 'user interface design'. Both elements are crucial to a product and both types of designers work closely together. But despite their professional relationship, the roles themselves are quite different, referring to very different parts of the process and the design discipline.
A user experience (UX) designer focuses their attention on the user's interactions and the overall flow of a product, whereas a user interface (UI) designer focuses on the layout and the actual design of each element that the user interacts with. Think of a UX designer as an architect that makes interfaces useful, and a UI designer as the person who looks after all the details and makes interfaces beautiful. Where UX design is a more analytical and technical field, UI design is closer to what we refer to as graphic design, though the responsibilities are somewhat more complex.
Both UX and UI design teams tend to work closely together, constantly communicating and collaborating in order to make sure that the final user interface looks as good as it can, while also operating efficiently. For example, if the UX design team is working out the flow of the product (like how the buttons will navigate the user through the tasks), the UI design team is concurrently working on how the buttons will appear on the screen, and will adapt their design to fit the layout.