UX: order and logic
UX, user experience, answers questions before anything is drawn. Who arrives on this page and what do they want. How many steps to the goal and can any be removed. What happens when something goes wrong, when a form is filled in incorrectly or an item is out of stock. The output of UX work is flows and structures, not pictures.
UI: appearance and response
UI, user interface, is everything seen and touched: typography, spacing, colour, icons, the state of a button while it loads, how a form error looks. Good UI makes the structure feel obvious. Bad UI can hide a good structure behind grey text nobody can read in sunlight.
Why they are done together
On small projects the same person does both, and that is fine, because splitting the roles only makes sense once a team grows. What is not fine is skipping the UX part: when drawing starts immediately you get a handsome screen that does not know what the visitor should do. You notice later, through enquiries that never arrive.
How it is measured
Not by taste but by behaviour: how many people reach the form, how many send it, where they abandon, how long loading takes. Without measurement a design discussion becomes a discussion of opinions. How design connects to visibility is covered in the piece on web design.
We work design from structure toward appearance, tell us what the visitor should do.