Typically with modern CMOS logic (74HC and that sort of thing), as well as modern microcontrollers of most description, there is already a limited amount of ESD protection built in.
This is implemented in the usual way, with clamp diodes for each external pin.
For instance, if you take a look at NXP's datasheet for the 74HC595 (
http://www.nxp.com/documents/data_sheet/74HC_HCT595.pdf ), and scroll down to "8. Limiiting Values" on page 6, you will see `Input clamping current' and `Output clamping current'. You will see they're both ±20mA. This means the clamp diodes can take up to 20mA (either sink or source) if they're over VCC or under GND. So if you've got it powered at 5V and you touch it with 1000V+ from your nylon carpet walk, the clamp diodes will safely conduct that current up to the 5V power supply (which will absorb it), as long you don't supply more than 20mA. That's 20mA continuous, by the way, so that's why you can get away with putting 24V on a microcontroller/CMOS logic input all day as long as you have a 100K resistor inline to limit the current.
In practice, most things don't really need ESD protection. USB lines would be one to argue for, as that's hot-pluggable and you can get some decent build-up of charge there with a long cable when you first plug it in.
If you were worried about it, you could use this classic circuit, which shrinks right down to a pretty small board area if you use 0805 components; it will protect against pretty much anything you throw against it:
It works because the 100K resistor limits current—even at 1000V it's only going to be 1mA. You also have extra (discrete, external) clamp diodes which will be rated for much higher current than the microcontroller/logic IC's internal clamp diodes. The pull-up resistor and capacitor to GND aren't necessary, but help smooth out transients and glitches due to noise and switch bounce (easier than doing it in software).
Or, you can use something off the shelf; even smaller in SOT-23 size. This example from ST is typical:
http://www.farnell.com/datasheets/1671027.pdf