Objectionable websites are a real problem for people who want to keep that kind of influence out of their homes and offices. The best way to protect your computer from going to such websites is to install a "content filter" on your computer. You should research the functionality and capability of content filters, select one, acquire it, and install it on your computer.
First Step Internet does not provide or recommend any particular content filter. The following link may help you get started on your search.
http://internet-filter-review.toptenreviews.com/