This technique is known as responsive design. To implement this, one can utilize CSS media queries or utilize a CSS framework like bootstrap which includes responsive classes to show/hide elements based on the size of the target window/device.
Here's an example of a media query:
@media (max-width: 700px) {
img#yourImage {
display: none;
}
}
Check out a working demo of a media query here.
Now, here's an example using Bootstrap:
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" />
</head>
<body>
<img class="hidden-xs" src="http://i.imgur.com/1XKZPVe.png" />
</body>
</html>
View a live demo of Bootstrap in action here.
Bootstrap essentially simplifies responsiveness by using media queries within its own stylesheet. This means you can easily apply pre-made classes to accommodate various devices, saving you from having to create custom media queries from scratch :)