Webcams have color CCD or CMOS chips with tiny high-resolution pixels that shoot continuous digital video. They work very well for high-resolution planetary imaging, but not very well for deep-sky imaging.
Digital SLR% cameras have become popular for deep sky imaging because they offer complete creative control over aperture, shutter speeds and ISO. They have large digital sensors. Their lenses can be removed and replaced with an adapter that allows them to be hooked up directly to the telescope where the scope acts as the camera lens.
Deep-sky astrophotography requires a very different type of camera, one that can take long exposures of a couple to dozens of minutes with low noise. Dedicated astronomical CCD cameras reduce noise by cooling the camera many dozens of degrees below the ambient temperature. DSLR cameras can also be used for deep-sky imaging if they have low inherent noise and many short exposures are combined together to further reduce noise.
Inexpensive CCD cameras with extremely small chips can be purchased for $300. A good astronomical CCD camera with a decent sized chip can cost anywhere from $3,000 to $10,000.
A good low-noise DSLR camera can cost from $500 to $2,000.