Someone who actually boxes here.
I'm going to assume that the bag is more of a unique way to get cardio in, and you're not attempting to step into a ring anytime soon.
I recommend you look at some Youtube videos on the basics of punching before doing anything. They'll be much easier to gain info from than trying to gather tips from this subreddit.
Here are some basics:
1) Find out if you're Orthodox (left foot forward) or Southpaw (Right foot forward). Chances are you're Orthodox. This just means that you keep your left foot forward, jab with your left arm, and do hooks and straights with your right arm (stronger punches).
2) KEEP YOUR KNEES BENT. In boxing, this has more to do with balance, but it is also essential in properly punching so that your body truly moves with the punch. This provides more power to your punches and also prevents injury.
3) Punch with your first two knuckles. In other words, imagine that the boxing glove isn't there, and make first contact with your middle finger's knuckle. Keep your thumbs out.
4) Don't put all of your might into every punch. You'll get winded too quickly and risk injuring yourself. It's stupid. Especially considering you care about the cardio.
5) Pivot from your hip. You should feel like you're constantly "rotating" or swiveling your body when doing consecutive left, right, left, right punches.
6) The power in your punches come from your legs as well as your arms. Make sure you teach your body how to transfer that power from your feet to your hands (much easier than it sounds).
7) When you're punching with your right hand, you should find that your right heel is lifted, and your toes are pivoting counter-clockwise with the punch. When punching with your left hand, you should find that your left heel is lift, and your toes are pivoting clockwise with your punch.
8) Take everything slow at first. It's all about finding that rhythm. Chances are you'll only do half of these things correctly first. Who gives a shit. All that matters is that you're sweating and not injuring yourself. Have fun.