How can you be friends with someone...

Serious question... can you be friends with someone of the opposite sex when you’re in a serious relationship? Like how does that work ? Especially when your boyfriend gets really jealous...