Speaking of walking, that's the catch: some Pokémon require walking longer distances than others to earn Candy. For example, while Pikachu requires walking 1km, other Pokémon like Growlithe require 3km. Some particularly rare Pokémon, like Dratini, will force you to walk as far as 5km to earn Candy. So, if you choose your Buddy Pokémon wisely and walk far enough, you'll be a Candy-finding dream team.
Niantic's support page offers a great piece of advice on this: "Remember to keep the Pokémon GO app open while you walk. Kilometers walked when the Pokémon GO app is closed won’t count toward earning Candy." As you may know by now, this concept also applies to distances needed to hatch Eggs.