Will I go to jail if I accidentally visit an illegal website?

As a curious teenager, I was looking at some raunchy stuff one day, late at night (the site was p***hub.com - the most popular adult site on the internet currently) on my iPhone. FYI, the site I accessed was perfectly legal.

All of a sudden, an advertisement for another p**n site popped up. I didn't take a good look at it and I closed it immediately on my iPhone.

But it got me thinking about something:

1) Are all the popup ads on P**nhub legal/in compliance with the law?

But more importantly

2) In the event that I access an illegal website BY ACCIDENT, am I still going to be arrested, or go to jail?

I've been going paranoid over this, and I've even lost sleep over it. Please let me know how what I should do.

1 ) Only if you're over 18
2 ) Highly unlikely.