Best thing is to sit them down and tell them straight. If they found out from someone else it'd be way worse.
But have a plan ready. Tell them you're really going to concentrate in this subject now and you've asked a teacher for help. Maybe promise to study over the summer? Try and look prepared to improve yourself.
Also, getting a bad grade isn't always a bad thing. Better it happen now than next year, right? You know what you need to work at now. It's a learning experience.
Good luck telling your parents, they'll probably be mad at first but if you handle it maturely then you're making the best out of the situation.