Joyce often uses colorful similes to describe Stephen's thought processes. In Chapter 3, Part 2, Stephen's mind becomes a flame-filled "tenement":
His [Stephen's] brain was simmering and bubbling within the cracking tenement of the skull. Flames burst forth from his skull like a corolla, shrieking like voices.
Stephen's thoughts take on a "simmering" and "bubbling" quality as flames burst (metaphorically) from his skull. The "crackling tenement" is a metaphor for Stephen's skull, which seems unable to hold his brain—thus implying that his thoughts are too intense for him to fully contain. This device also recalls Father Arnall's lectures about death, judgment, hell, and heaven. Stephen feels immense guilt about his lustful thoughts, so it makes sense that he would think of his own brain as a fiery, lustful entity.
In Chapter 3, Part 2, Stephen also finds solace in the thought of confession:
The thought slid like a cold shining rapier into his tender flesh: confession. But not there in the chapel of the college.
These two moments of simile and metaphor create a contrast between hot and cold thoughts—initially, his brain simmers and bubbles; eventually, though, a clear thought slides through his brain "like a cold shining rapier." Heat represents sin and uncertainty; sometimes Stephen's brain becomes a crucible of change. Cold signifies clarity and order, hence the "shining rapier" of thought that cuts through his bubbling brain.
Joyce often uses metaphors to convey lofty ideas about language. In Chapter 4, Part 3, the narrator describes language as a "prism":
Did he then love the rhythmic rise and fall of words better than their associations of legend and colour? Or was it that, being as weak of sight as he was shy of mind, he drew less pleasure from the reflection of the glowing sensible world through the prism of a language manycoloured and richly storied than from the contemplation of an inner world of individual emotions mirrored perfectly in a lucid supple periodic prose?
Here, language is a "prism" through which Stephen may convert the dull events of everyday life into high art. A prism is a piece of cut glass (or other transparent material) that has refracting surfaces that separate white light into a spectrum of colors. Because prisms refract light, this metaphor suggests a process of change or alteration.
He seems torn between the "glowing sensible world" and his own "inner world"; different types of language correspond to each realm, and the "prism" represents the multifaceted perspective that an author of the world could provide (as opposed to the contemplative, perfectible prose of the "inner world.")
This passage also contains a few good examples of alliteration in phrases like "rhythmic rise" and "periodic prose." Alliteration makes the prose lyrical and rhythmic; it also reminds the reader of the heights of grace and beauty to which Stephen aspires in his speech and writing.
Joyce uses priesthood as a metaphor for artistry. In Chapter 5, the narrator describes Stephen as a "priest of the eternal imagination":
To him she would unveil her soul’s shy nakedness, to one who was but schooled in the discharging of a formal rite rather than to him, a priest of the eternal imagination, transmuting the daily bread of experience into the radiant body of everliving life. The radiant image of the eucharist united again in an instant his bitter and despairing thoughts, their cries arising unbroken in a hymn of thanksgiving.
Here, the metaphors of priesthood and the eucharist communicate the significance of artistic transformation. Stephen imagines himself as an artist who "transmutes" dull daily experiences into beautiful works of art. In the previous chapter, he decided to trade his religious devotion for artistic pursuit; this metaphor bridges the gap between the two phases of his life. This moment also recalls Stephen's epiphanies in Chapter 4; his artistic epiphanies often have an ecstatic religious quality. Joyce compares art to religion via simile, metaphor, and symbolism in an effort to show how art supplants religion in Stephen's life. Art provides an avenue for spiritual fulfillment while keeping a reasonable emphasis on earthly (and bodily) experiences.