They're used for all sorts of things. They can be programmed to give any kind of logic function. Common examples are address decoding and graphics mixing. They can also be used for protection. In extreme cases, large programmable logic devices are used to implement entire video output systems (sprites/tilemaps/blitter).