Most comets are primarily ice with some rock in them.
At the edge of the solar system, beyond Neptune and Pluto (about twice as far away, I think) there is a ring of icy debris called the Kuiper belt on the ecliptic. If a collision out there causes one to fall into an elliptical orbit, coming closer to the sun at one end, that creates a short-period comet moving on the ecliptic, that is, on much the same plane as the planets.
Way out beyond that is the Oort Cloud. It is a sphere of debris, not a ring. If a collision causes a piece to fall into eliptical orbit from out there, it creates a long-period comet. Long period comets may come from off the ecliptic, either above or below it. To learn more, check out http://en.wikipedia.org/wiki/Solar_system#Comets .