Try relighting it according to the manufacturer's instructions. If it continues to go out, there might be an issue with the thermocouple or gas supply. It's best to call a plumber to diagnose and fix the issue.