Ulysses is structured by Homer's The Odyssey. Full of puns, allusions, symbols, and parodies, this novel was unlike any other that preceded it. Ulysses is a novel that is said to have "broken all the rules" certainly in terms of style. Joyce uses stream of consciousness to explore the psychological depth of its main characters and this delving into a character's consciousness allowed Joyce to employ the myriad of puns, allusions, and literary references in a swirling, dream-like way that is more easily done in a stream of consciousness style.
Each episode of the book corresponds to the chapters in The Odyssey. This is the most overt reference the Greek text and this includes the allusions to Greek culture and mythology.
Being a literary work which has so many literary references (i.e. Hamlet and The Odyssey), Ulysses shows how a literary text can be seen as a link to other literary texts (including the literature of Greek mythology). This is called intertextuality. Intertextuality shows how a meaning is shaped in its relation to other texts. For example, the meaning of Ulysses is shaped by its reference to other literary (and mythological) works; and in turn, those works have now been shaped by Ulysses. This is one of the most brilliant affects of the novel. Now, a reader who encounters Ulysses will not only shape the meaning of the novel because of those literary and mythological references; the reader will also reshape meaning of those past literary works. One who has read The Odyssey and then reads Ulysses will now look at The Odyssey differently; and vice-versa.