I will give a simple example .. consider you want to implement a 2x1 nand gate.
And you have 4:1 mux ..and SRAM memory
you can tie the mux inputs to 0 or 1 so that it acts as a nand or nor gate and keep the select pins as the input of the gate.
many techniques like sram,anitfuse etc are used in fpgas to store the bit pattern used for programming.
Read this turotrial
h**p://www.eecg.toronto.edu/~jayar/pubs/brown/survey.html
h**p://www.eecg.toronto.edu/~jayar/pubs/brown/survey.ps.gz
regards
Whizkid