Generally, a browser will have what's called a User Agent which will tell the web site what browser is currently accessing the site.
These user agents will generally tell the website whether they are a mobile device or not.
A website can then serve up different pages or make pop ups show up when the browser that is accessing the website identifies itself as a mobile device.
Depending on the browser, you can tell the browser to present itself as a Desktop browser rather than a Mobile browser. On Chrome for Android, this can be done by tapping the menu button and ticking "Request Desktop Site"
Check out the this wiki article for some more indepth information - http://en.wikipedia.org/wiki/User_agent