The goal of cardio is to simply burn calories. It does not matter what form of cardio you do, as long as it gets you moving and gets your heart rate up! You do NOT have to do cardio in a gym.
You could go for a bike ride outside, go for a walk, skip etc. If you don't like doing traditional cardio on a piece of cardio equipment, then things like MMA classes, swimming, playing floor hockey or basketball etc. are great options.
At the end of the day, anything that gets you moving and increases your heart rate is a great option and good for fat loss!