Originally passed in 1865 to prevent soldiers from sending pinup pictures throught the mail. It was easily passed by Congress. Made it illegal to send any "obscene book, pamphlet, picture, print, or other publication of vulgar and indecent character" through the mail.
Later on it was revamped. In 1873 the US Congress passed a new version that basically said anything sexual, especially abortion and birth control, was illegal. The exact text was this "obscene, lewd, or lascivious book, pamphlet, picture, paper, print, or other publication of an indecent character" through the mail. It wasn't much different in wording but it had more consequences.
It was named after Anthony Comstock. After the law was passed Comstock boasted he had confiscated 202,679 pornographic pictures; 4,185 boxes of pills, powders, etc. used by abortionists; and 26 obscene pictures hanging on saloon walls. He also was proud to say that he had driven 15 people to suicide.
Many abortionists and women ended up being jailed. Many sex educators were actually hounded to suicide (hence Comstock's claim). Also many writings of famous authors like Balzac, Freud, and others were also outlawed. The law in the end didn't have much effect on pornographic material.
The Comstock Law was never repealed. It was changed to be a bit less harsh in the 1970's but it still outlaws the transport of materials concerning abortion. However, it isn't really enforced anywhere. Legislation was introduced to repeal it, but i'm not sure of the outcome.
Info from www.brittanica.com and The American Pageant: A History of the Republic by Thomas A. Bailey and David M. Kennedy.