After installing the fresh battery, press the reset button on the back. You should then see a Download / Reset menu on the screen.
Select Download to keep your current Tamagotchi character intact with all its points, food, snacks, items, souvenirs, parents history, friends. etc.
If you select Reset, you will start all over from the very beginning, and lose all the points, foods, snacks, items, etc. that you've gotten so far.
P.S. don't forget to set the clock to the correct time.