I have done this using canon DSLR, but I assume its similar with any other brand.
--- You need a T-ring which is the adaptor for the camera-lens joint. You just thread it onto your camera, just like a lens.
--- Telescopes typically come with 3 kinds of eyepiece focussers: 0.965", 1.25", and 2" inner diameter. Rarely, you have larger or metric ones, but doesnt matter for now.
Most 'cheaper' telescopes come with eyepiece holder/focussors that does not have any useful thread on them, so you cannot screw your camera directly onto it using the T-ring.
You need a T-adaptor / nose piece which goes on the T-ring. This is a tube that slides into the focusser just like any eyepiece, so you can tighten it there. Long long ago, I got one from tejraj for 1.25" focussers.
You thread one side of the nose piece onto your T-ring, so you can slide the other side into your eyepieece holder/focussor.
--- With the above, you can "fix" the camera to your telescope.
BUT, this is not where the problems ended for me... The focal point of the primary mirror was a bit too inside the focussor, so I couldnt get any celestial objects into focus on my camera. IF you have this trouble with your telescope, there are few things that you can do to solve this:
1. Move the primary mirror towards the secondary, so the focal point is pushed out of the focussor (I do NOT recommend this for first trial).
2. Use an achromatic "barlow lens" that will push your focus out, but will also increase the magnification (this is what I did, and it worked like a charm for solar system imaging).
3. Get more adapters, so you can do eyepiece projection imaging (advanced option, and I would not recommend you to do it in the beginning).
Hope this helps...
Clear skies,
Santhosh