Your Mac will automatically go to sleep when you leave it alone long enough, but you can customize the sleep settings to your liking.
You can easily add or delete a guest account on your Mac through the System Preferences app on your computer.