Is it Illegal?
Only if it is judged by law to be obscene and is dispersed or transported, beyond private use. Historically some of literature's great novels, such as James Joyce's Ulysses and D.H Lawrence's Lady Chatterley's Lover, have been banned as obscene. Nowadays, depending on the community in which you live, certain types of sexually explicit visual and verbal works are prohibited by state obscenity laws.
Because accusations of obscenity can be used as political weapons to censor controversial expression, the Supreme Court created the "Miller Test" to help judge what is obscene: (1) the proscribed material must depict or describe sexual conduct in a patently offensive way, (2) the conduct must be specifically described in the state law, and (3) the work taken as a whole must lack serious value and must appeal to a prurient interest in sex. A jury decision in an obscenity case is subject to independent constitutional review.