For the most part, if you sign up for a pay as you go SIM from a household-name network your credit won't expire as long as you keep the SIM card active. This generally necessitates making a chargeable call or sending a text message. And depending on the network you choose, they'll stipulate you have to do one of the above every six months or so.
However, less well known, smaller networks tend to be a bit less forgiving. Once again it depends on the network, but some will cancel any credit on your account unless you use it within 90 days of topping up.