Prepare the pan
Preheat the oven to 350°F. Grease and flour a 9x5-inch loaf pan, 9-inch round cake pan, or small Bundt pan. Line the bottom with parchment paper if using a loaf or round pan.
Mix the dry ingredients
In a medium bowl, whisk together the flour, baking powder, and salt. Set aside.
Cream the butter and sugar
In a large mixing bowl, beat the softened butter and sugar until light and fluffy, about 2 to 3 minutes.
Add the eggs and vanilla
Beat in the eggs one at a time, mixing well after each addition. Add the vanilla and mix until smooth.
Add the milk and dry ingredients
Add the flour mixture in three additions, alternating with the milk. Mix on low speed just until combined. Fold in the sour cream or yogurt.
Make the chocolate batter
In a small bowl, stir the cocoa powder, hot water or warm milk, and sugar until smooth. Scoop about 1 cup of the vanilla batter into the cocoa mixture and stir until evenly chocolatey.
Layer the batters
Spoon alternating dollops of vanilla batter and chocolate batter into the prepared pan. Repeat until all the batter is used.
Create the marble swirl
Run a butter knife or skewer through the batter in a few gentle figure-eight motions. Do not over-swirl, or the colors will blend together too much.
Bake the cake
Bake for 40 to 50 minutes, depending on the pan, or until a toothpick inserted in the center comes out clean or with a few moist crumbs.
Cool before slicing
Let the cake cool in the pan for 10 to 15 minutes. Transfer to a wire rack and cool completely before slicing or glazing.