Mounting a punchbag on the ceiling is certainly possible, especially if your ceiling has exposed studs. If not, you'll need is a stud finder, a big drill bit and large bolts.
Rope a Dope
If you just have the bag and the chain, the easiest way to hang your bag is to use heavy-duty rope. If your ceiling has exposed, solid wood beams, drill a hole high up on the beam that you can pass a rope through at least two times. Once your hole is drilled, round the bottom edges with a rasp and sandpaper so the rope will loop over both sides of the floor support beam. If you don't have the luxury of this type of ceiling or don't want to drill a big hole in your floor support, you can get a simple loop bracket and bolt that into the ceiling.
Get a Mounting Bracket
If you don't like the swing of your bag with the rope and want a more stationary target, get a swivel bracket. All the hardware should come with the bracket, which you can find in most sporting goods stores and should come with a good bag. The swivel bracket will keep the heavy bag swinging in a shorter radius with more rotation.
What You Need
Any way you mount a bag to a ceiling should involve a good stepladder, a decent drill, and a drill bit just a bit smaller and shorter than the bolts you'll be using. You should have a deep socket and socket wrench for the bolts. You might also need a friend or two to help lift the bag up so you can chain it or tie it to the bracket.
Drill Into a Good Beam
Pre-drill all the holes by taping the bracket to the ceiling and using the bracket's bolt holes as drilling guides. Make sure you have a stud to bolt to and that you are as close to the centre of the stud as possible.
Mount Your Bracket
Use a good socket wrench to screw your bolts in, and affix a thick pipe to the end of the wrench if you have to gain some extra leverage for the final cranks. Make sure your bracket is as tight as possible, even if it means you're never going to be able to undo those bolts. You should be able to hang on the bracket without bringing down the house, and that means a tight and unwavering attachment to that beam or stud. There should be no play or looseness.
Hang Your Bag
Mount your bag to the bracket with a friend's help. It's even better with two people to help. One can go up the ladder and hook it on while the other two hold the bag at the proper height. The biggest issue you'll face at this point is the web of chains not staying hooked to the loops on the bag. Use duct tape to secure these points to avoid this issue when mounting.
Check For Safety
Your bag should swing without causing paint to flake off the ceiling, though the house may shake a bit. Practice hitting the bag and watch the mounting point to make sure there is no serious buckling. And just because you're hitting a bag doesn't mean you shouldn't keep your hands up. Sometimes a badly mounted bag can fall apart at the least expected moment, and a heavy chain may whack you good, so keep your guard up.
If there's no place to mount a bag where you need to and no sufficient beam to support it, you can always purchase a self-contained mounting unit, many of which also have room for a speed bag mount as well.