Obscenity is a very individual perception and idea, one that has been very difficult to define legally. The Supreme Court has said that common standards of decency in our communities should decide from place to place, and that while obscenity was difficult to define, "We know it when we see it". Attempts to prosecute people for obscenity are relatively rare, and though sometimes successful, seem very selective in nature.
Laws will vary depending on where you live. The word obscene refers to lewdness, indecency, and offensive behavior, whether it is communicated through expression or appearance. There are many laws that prohibit these kinds of behaviors or acts. Obscenity is punishable by law but it is often difficult for the courts to decide what is actually obscene. If something is considered to be obscene then that person is not protected by the First Amendment, which protects an individuals freedom of speech. Most matters concerning obscenity involve sexual conduct and lack any kind of value whatsoever.
The courts have struggled with this question for years. Basically obscenity is defined as any communication that the average person, using contemporary community standards, appeals to the prurient(sexual) interests, or depicts sexual conduct in a patently offensive manner, and taken as a whole, lacks serious artistic, literary, or scientific value. That is what the U.S. Supreme Ct. said about obscenity. In essence, obscenity is different things to different people. It is determined at the local level(local community). There is no bright line that specifies what is and what is not obscene.
As a side note, I remember a couple of years ago in a neighboring city, some businessman wanted to open up an "adult" store. Good heavens at the outrage. Turns out he went elsewhere.
In practice, almost nothing is obscene in the United States. Legally, if there is a dispute about whether something is obscene, it would be decided by the court system. The courts are supposed to apply something called the Miller test (after a Supreme Court case from 1973).
There is a three part definition for what is obscene.
First, the work, taken as a whole has to appeal to "the prurient interest." This is defined as an abnormal (whatever that means) interest in sex.
Second, it has to show sexual conduct in a "patently offensive" way.
Third, it has to have no serious redeeming value (no serious literary, political, scientific, or other value).
This should be decided based on the standards of a given community.
So the courts decide what is obscene based on this test. They generally do so when a government tries to ban something or arrest someone for selling it.