First off, tuck the lens safely back into your camera bag. You won't be needing it. (Put the covers on it to protect from dust & scratches!) Then, you will need a T-ring and T-adapter. Those can be easily and cheaply found online - for instance, here for Nikon, and here for Canon. Now, which T-adapter you use will depend on your telescope. I started with a 1.25" one for my C8, since it was the same size as my eyepieces, but this turned out not to be a good idea - I got this ugly thing called "vignetting." Basically, that 1.25" hole cut off the light on the edges of the chip, which made the corners of my images dim. Here is a flat white frame taken with that configuration.
There is still some vignetting (due to the fact that the telescope has a circular aperture, and your camera a square chip), but much much less.
That Schmidt-Cassegrain adapter can be found here.
For people who have refractors, Newtonians, or other scopes that take 2-inch eyepieces, get something like this. And I recommend one with filter threads.
Then, basically, you just put the pieces together. The T-adapter screws into the T-ring, like so:
Then screw it onto your camera as though it were a lens:
And then attach to your telescope!
You will need to re-focus your telescope, as the focal point will be different than where it is for your eyepieces. I recommend not using a mirror diagonal with the camera - it just adds another point for the camera to vibrate on, have additional chromatic aberration, and have additional dust motes or scratches.
Depending on your telescope, you may have additional things you need to put in the optical train.
- Focal reducer/field flattener - I use a 0.63x focal reducer all the time now on my Schmidt-Cassegrains. This allows the camera to collect light faster, and gives me a larger FOV that is still very well suited for most galaxies and the smaller nebulae, such as M20 and M17. The field flattener part of that lens also helps reduce coma found in many telescope types, and the field curvature sometimes found in small refractors.
- Light pollution filter - I have an Orion SkyGlow filter for my SCTs (Schmidt-Cassegrains), and an Astronomik CLS filter for refractors (it screws onto the front of my refractor T-adapter). It will make your images bluish (which is correctable), and will reduce the amount of light pollution in your images. More on that later.
- Field de-rotator - if you have an alt-az mount, there is a device you can use to un-do the field rotation (see this post).
So there you have it!
As far as CCDs go, those typically connect the same way your eyepieces do - in the 1.25" port your mirror diagonal goes into. Fewer additional parts required.