Wellll... there's speculation as to whether or not he actually IS a demon or not now. If he in fact is, it's because of drinking all that demon blood with Ruby. But that might have just been a one-time reaction to the bad shit he was into. It's up to you to decide.
It started when Yellow eyed demon made a deal with Mary. The deal was that he would keep John alive if he could come back to her house and fed a 6 month old Sam demon blood. (Mary didn't know exactly what YED was gonna do since he didn't tell her)
There is also the fact that Sam has been having a litte addiction to Demon blood. As we have seen in some of the episodes this season.
All this built up and Sam evantualy became a demon.
Hope that helps!
It kinda started when Azazel(YED) dripped blood in his mouth when he was 6 months old. But he wasn't really like officially a demon. To kill Lilith he had to drink alot of blood and while killing her his eyes turned to the demon ones. I only just finished season 4 though so im not sure if he stays a demon or not.
Sam's never actually turned into a demon. The only way for someone in Supernatural to truly turn into a demon is to be tortured in hell until they lose their humanity. Sam's been possessed by a demon and been infected by demon blood, but he'd never actually become a demon.