Ask your teacher if you could complete any extra-credit assignments. You could also ask your teacher why you're failing and potentially get help with what you're struggling on. A lot of people fail because they never study, so also do plenty of that!