Why do you ask? What scene do you have in mind?
In TLJ’s case you just crop them out whereas I’m not quite sure what the process is for TFA’s. It appears to be long and arduous but it’s been done with at least higher priority scenes like Kylo searching the Falcon. Presumably uses either rotoscoping, AI, or a mix of both. There’s a thread dedicated to the matter.