Freud believed the mind is composed of three parts: the id, ego, and superego. The id operates based on the pleasure principle, seeking immediate gratification of urges. The ego balances the id's urges with reality, using secondary process thinking. The superego incorporates societal morals and can cause guilt when urges conflict with its standards. Defense mechanisms like repression, denial, and rationalization help resolve conflicts between parts of the mind. Anxiety results from threats to the ego's control from internal or external sources.