When Ulysses was first published, it was widely banned. There was an international debate about whether or not it was an obscene and pornographic book. The debate was somewhat settled when American Judge John M. Woolsey argued otherwise, but it remained contraband in Ireland for many years after that.
So what's the fuss? Ulysses is not for those with delicate sensibilities. Throughout the novel, we see Bloom eying women around Dublin and thinking dirty thoughts about them. Joyce takes this to a new level in the "Nausicaa" episode when Bloom observes Gerty MacDowell on the beach and begins masturbating. The language is veiled, but here's a hint: all those fireworks shooting up in the air and the O's and A's aren't just Bloom's enthusiasm for pyrotechnics. Later on, in the "Circe" episode, when Bloom follows Stephen into a brothel, he engages in an elaborate fantasy where he is tried in a surreal court for being a lewd man. Bloom imagines some bizarre masochistic sexual experiences, both enjoying them and feeling guilty about them at the same time. But the real reason we gave the book an "R" rating is because of the final episode, "Penelope." Molly Bloom is extremely frank about sexual matters and thinks back to her afternoon with Boylan in enormous detail, imagining different positions, the pros and cons of oral sex, etc.
Sex is important to Joyce, as evinced by Ulysses as well as Joyce's 1909 letters to his wife Nora Barnacle. One of Joyce's problems with the Catholic Church was that he thought it made people ashamed of their bodies. In his letters and in Ulysses, Joyce proposes what he terms a "pornosophical philotheology." The quadruple entendre hints at how Joyce loves to juxtapose what is thought of as sacred with what is thought of as profane. In his letters, he tells Nora that she is like a Madonna to him, and then segues right into his desire to lick her. You get the idea.
Of course, sex in Ulysses is always tinged with sadness. The center of conflict in the novel is the fact that Molly Bloom is having an affair with her manager, Blazes Boylan. As the novel goes on, this becomes more and more understandable. Bloom has not been able to sleep with her for ten years: ever since their son Rudy died. Plus, Bloom himself is exchanging lewd letters with Martha Clifford and masturbating to Gerty MacDowell. Still though, when we get Molly going on about how big and vigorous Boylan is, it's easy to imagine how such thoughts could drive a husband insane. The struggle here is between love and sex. Bloom still loves Molly and she still loves Bloom, but he has to come to terms with the fact that he is not able to please her sexually. It was a neurosis of Joyce's and one that, whether or not they admit, many men share.