A pilot light that goes out once is annoying. A pilot that goes out every few hours or days means a part has failed. The thermocouple is the cause 80% of the time -- it is a $5-$12 part and a 10-minute replacement. The remaining 20% is split between a dirty pilot orifice, drafts blowing the flame out, and a failing gas valve. Work through them in order and you will find the problem without guessing.