yeah that's not an uncommon prob.
and it's not nice to have to catch up afterwards - as if we don't get enough to do out of school, without having to add whatever it was we did in class as well, eh?
i've realised that the best way is really just to 'tune out'. it's not easy, especially when they're cracking jokes and you can't help but laugh alongside. but you have to try and shift your focus. once you do, they'll also realise that you're focusin on the subject and either they'll stop and start focusing too, or at the very least, they won't directly involve you in the convo. that way you won't be disturbed.
alternatively what i had to do in year 9...in computer studies me and my friend wouldn't get JACK done. i went to the teacher after class and explained her my situation. i told her i'd asked the grl to get serious, i'd tried to focus....it wasn't working. the only option was for me to move away from her, and since we were the only friends from our group in that class, movin away from her would essentiallly nigelate her...
i wouldn't be able to move away without giving her a reason and i didn't have a reason to give - that she would accept and that she wouldn't be hurt by
in short! i asked the teacher to find reason and excuse to move me away from her, so that it was her moving me away rather than me moving away.
and the teacher is prepared to do that much for you, so dont hesitate to explain your situation to your teacher. they understand it, and don't mind helping out.
let us know how it goes