Carl was bitten after trying to save the life of a stranger, Rick and Michonne took him to a safe place.
He was hurt, he knew he would soon become a walker, aggressive...until you appeared, a stranger and lone survivor, with experience in medicine and fighting, you were able to heal Carl a little, cutting the bite out of his skin, basically, you cut a piece of his flesh which was bitten, you even cut a piece of your own skin so you could sew it on the area you cut, you successfully sewed it up, You could stop him from turning into a walker... then you came up with the great idea of injecting him with some of your blood so that the walker's blood couldn't expand and it could be combined with your own blood, thus preventing Carl from becoming a walker.
He fell asleep and unconscious, when he woke up he found himself in a strange room, until he realized that you were next to him sitting in a chair. "...who are you?" he responded with a weak voice.