User Experience is a practice which has historic roots in multiple other disciplines, uniting and combining them to provide something new. What are the building blocks of UX and what role do they contribute to the whole?
The comment by 3nafish points to answers of what UX is, but it sounds like you’re particularly interested in where UX comes from. The parent disciplines of UX can be revealed by the academic background of the practitioners. In UXMatters 2010 reader survey, that background was primarily:
Computer science, especially human-computer interaction.
The parent disciplines reflect the fact that UX work is concentrated in web site and software user interface design (despite our grander ambitions). UXers are primarily concerned with effectively conveying information, as text and images, to a user through web pages and mobile apps. Computer science gives UXers the technical know-how for such media. Graphic design teaches the use of colors, lines, shapes, layouts, and font to effectively present information. Cognitive psychology provides insight into how users process information, and also contributed the experimental methodology that inspires usability testing. Library science teaches how to organize information for findability. Technical communication teaches how to write understandable content.
UXers are also concerned with eliciting an emotional response in our users, on which graphic design instructs, in addition to how to effectively convey information. Strangely, we don’t draw much from creative writing, social/personality psychology, or marketing, which would also instruct us in that area.