You can do that anywhere the client requests something from the server. For example, in plain html:
<img src="http://somewhere.com/file.php />
file.php should send an appropriate mime type header as well as output a valid image. Apart from that, you could have the php file do whatever you wish. One use would be to randomize what image is shown to the user, or select it based upon the user, time of day or similar (or do something absolutely not related to handling images). However, normally there is no reason for the above as you could just as well deal with this when you create the page in the first place:
if ($something)
echo '<img src="somepic.jpg" />';
else
echo '<img src="otherpic.jpg" />';
And as for the "no php in css", you could turn it around and make a php script output a css.file. That is, instead of specifying an css file you specify a php file which outputs a css file. So instead of:
<link rel="stylesheet" type="text/css" href="/file.css" />
You'd have:
<link rel="stylesheet" type="text/css" href="/file.php" />
But generally I'd advice you to deal with this at page generation and change what css file to include (as with the images above) instead. However, if you do run a php script to generate a css file on the fly, don't forget that css files are generally automatically cached client side.