It depends on the group of people, really. We're pretty open and we have some friends that are as well, if that's the case we just carry on, generally making it a bit more light-hearted though, and less about the nitty gritty details.
If I'm talking sex with one of my more reserved friends, and my SO, or hers walks in...we'd generally change the topic (Or, more likely, sit there giggling like school girls looking guilty because they KNOW!!)
But, it also depends on topic. Am I helping a friend work out an issue in the bedroom? If that's the case it's generally not something she or I would want to speak about with a bunch of other people. Are we just talking sex in general and not anything personal? Then we'd likely carry on regardless of who came in, or who the conversation originally started with.