You first sacrifice some pins to talk to an I/O expander. e.g. you use the two I2C pins to connect to a MC23017. There are lots of tutorials how to do that, including software. That gives you 16 pins so now you have 14 pins more then before. In fact you can connect up to 8 of those giving you 128 pins. 

But at a cost: you need to write some I2C software to control those pins, read and write them. That will be much slower that the other Arduino pins. Thus you use those MCP3017 pins for 'slower' signals. 

The MCP3017 also as in interrupt pin but to use that you have to sacrifice a third I/O pin of your Arduino. But it allows you to 'respond' to evens on the MCP3017 inputs.