Sans is a very intelligent skeleton, as well as the brother of Papyrus.
Neutral/Pacifist route[]
Sans is first seen at the entrance to Snowdin Forest after the protagonist exits the ruins. He walks behind them and initially comes off as intimidating and serious, before revealing himself as a goofy jokester. He instantly recognizes the protagonist as a human and reveals that his job is to capture humans, but claims that he is not interested in doing so. He then tells the protagonist to hide behind a conveniently-shaped lamp to avoid being seen by Papyrus.
Sans will almost always show up besides Papyrus during his puzzles.
Sans is next seen in Waterfall, at his stand. He offers the protagonist to come with him to Grillby's. If you say no, you can talk to him again, and he will ask you the same question.
Sans is next seen in Hotland, where he is selling hotdogs. If your inventory is full whilst you attempt to purchase a hotdog, Sans will put it on your head instead. He stops at 29 head hotdogs.
If you kill Papyrus, then Sans disappears for the rest of the game until Last Corridor, in which he will always berate you for killing his brother.
Genocide route[]
Sans then asks the protagonist another question: "do you wanna have a bad time?" He warns them that if they take another step forward, they are not going to like what happens next. After the protagonist takes another step forward, he apologizes to an old lady, stating that this is why he never makes promises. This initiates a battle. Sans starts the battle by saying:
"it's a beautiful day outside.
birds are singing, flowers are blooming...
on days like these, kids like you...
Should be burning in hell."
He then unleashes a fast-paced and wild attack onto the protagonist. If the protagonist survives, he says that he always wondered why people never use their strongest attack first.