More specific would be nice.
What phone?
What carrier?
Are you doing anything particular when it restarts itself?
Did this start after you updated/installed anything? Or has it been going on since you bought it?
Tbh, if it's that new - it's likely still under warranty. I would recommend just taking it back and getting a replacement.