Sleeping

To sleep, it has to be nighttime. Once it is dark enough, press on your bed and you will be in it with a leave bed button. You will instantly skip to dawn. If there are mobs around, you cannot sleep. In multiplayer, all players must be in bed in order to skip to dawn. If you do not have full hearts before sleeping, it will heal you.