Hi @wyfeng2013
The question is very general, so short answer is that it depends on your robot's capabilities.
Just to clarify some key concepts:
Localization is the process to determine the location of the robot with respect to its environment. Your robot might have localization capabilities or it might not. For example a GPS sensor offers localization capabilities. Although it may not very accurate it will give you a position in space as starting point. Your robot might not have the ability to locate itself as well, then it needs to rely in other methods for navigation.
Mapping is the process to build the map by a robot while exploring a space. The result of mapping could be an occupancy grid that gives information of map features/obstacles, empty space, etc. How you build this map will be depending on the sensing technology you have available such as 2D Lidar or it could be a simple distance sensor. Maps can be loaded to the robot ahead of time or not. Robots may find features in the environment and compare them to the loaded map to understand location in space. There are ways to achieve this also by changing the environment to help the robot locate. For example you can add qr codes for the robot to detect. The qr code can store information like the position in the map.
SLAM stands for Simultaneous Localization and Mapping. SLAM is the process to simultaneously locate(localize) and map the environment. While the robot explores, it creates a map and localize itself with respect to map being built. This information can be saved periodically or it can be saved when the SLAM process is completed. SLAM gives the robot the ability to learn from the environment and locate itself with respect to the map generated.
The robot upon reboot can assume that the last position recorded is the initial location but may or may not be true. So it will be a design decision whether to start SLAM process upon every reboot. Hope this helps.