Very simple. Sans isn't a skeleton. He's a monster who bears resemblance to a skeleton, which is how he can sweat. As for the bleeding, my guess is ketchup.
1- skeletons have blood vessels inside bones. (Yes it is scientifically confirmed) 2-i dont know how he sweats too... sweating is something only for skin