At the start, the Cobra Heartless relies on a lot of melee attacks that don't require much skill—just keep your health up and keep swinging your Keyblade. When it flies up and spins vertically, dodge-roll quickly to the left or right. When it spreads out and spins, equip Double Jump and leap over it. When it curls into the aura ball, hit it hard so it drops MP bubbles, then use magic on it. Mostly, just level up and you'll be fine.