This depends on the countries involved. The Schengen agreement brought a (non-contiguous) free travel zone to many EU (and some non-EU) countries. In this case, there's very little in the way of checks. They can ask for ID, but this does not need to be a passport (unless local laws mandate passport as ID for non-nationals). Checks here are very cursory, if at all. I've walked over the France-Belgium border and France-Germany borders, and not even seen a soul. If you're off the main roads, you'll hardly be able to tell you've crossed a border. You can get the train from Amsterdam to Paris without even seeing someone in uniform.
To the non-Schengen countries, it varies. The UK is generally very strict, so if you take a ferry or the Tunnel, you'll see plenty of police around. The borders to (and between) the new EU countries tend to be far more heavily controlled. A visit to the border station at Bratislava-Petrzalka is an introduction to this...
Between non-Schengen countries in the EU (or in Western Europe) on the train, it depends on the arrangement. You may have immigration and/or customs at the departure point, the destination, on the train, or any combination of all these. For example, the Eurostar (London-Paris/Brussels) can have all three. Basel (in Switzerland) has railway stations with platforms that are French and German territory. Or you could meet the mobile officers (like going into Slovenia), complete with their laptops, scanners and mobile phone links to central computers.
Many car hire companies are less than happy for you to take your hire car to the new EU states. And that means you're not insured there, and the border guards certainly look out for that.
An interesting feature of some of the borders (e.g. Austria-Czech) are some no-mans-lands which the more enterprising 'grey market' traders (and calling it grey market is *very* generous) use to their advantage to sell tax-free (and often really rather illegal) goods.
Between EU countries, there is no customs control. However, they do have the right to stop and search you for any illegal substances you may be carrying.
Schengen is not the only free travel zone - there are some reciprocal arrangements, such as the UK and Ireland.
And don't forget the non-EU countries that are in the middle of it all. Switzerland, for example. Or (bizarrely), the Channel Islands are not EU, despite being part of the UK.