I know that it is possible to get a horse, but I was wondering about a pet more on the lines of a dog. If it is possible, could you please provide an explanation on how to get a pet?
You can get this dog just by simply going to near his house. Make sure you follow him when you first see him. Afterwards, unlike the dogs you buy, you can tell him to head home and later pick him back up at the shack for free again. He does get annoying some times, since he'll run blindly into traps and bark over and over AND OVER AND OVER during important events.
Go to the Markarth Stables. You can buy a dog there called Vigilance, I think. You can find a talking dog just outside Falkreath, but he is part of a quest. You can exploit the quest by not completing it and the dog will follow you forever until you tell him to stop. He in invincible as well. There is also a dog in Meeko's shack as said before.