If your web host is showing their own ads on 404 error pages or pages that do not exist on your website. You may ask your web host to not do so. Your web host may provide instructions on how to go about creating your own custom 404/page not found error pages that do not include their own ads.
If your web host does not comply with your request then you will either have to decide to either stay with your web host or to change web hosts.