There are many factors to this question. Does the sex enhance the novel? If it does, most likely it will be kept. If it doesn't, it'll be up to each individual publisher. Some don't mind explicit scenes, others would rather not have them. It's also going to depend on the genre of the book and who you're targeting. If you're writing YA, Middle Grade or Children's books, it'll be nixed right off the bat. While sex may occur in these books, it is 99% of the time fade-to-black. Similarly, if you're targeting old ladies or heavily religious people, it'll most likely get nixed. If you're targeting adults, however, you have much more leeway.
Your best bet is to check each publisher's submission guidelines. If their guidelines don't mention anything or are unclear, don't hesitate to send them an email and ask. 99% of the time they won't have any problems answering questions from authors who are considering their house. And as far as I know, unless the book is extremely heavy on sex, they most likely won't reject it just for that. If they do have a problem with explicit scenes, they'll work with you on that in the editing phase of things.