there's several approaches you could take. swirl yellow/white cake batter into chocolate (or vice-versa) or spoon alternating cake batter into the pan. most commerical marble cake mixes have directions on the package. if you're baking from scratch and you can't find a specific marble cake recipe, look for compatible yellow/white and chocolate cake recipes (similar ingredients, bake time, etc.). i'm rather fond of mary ford's all-in-one butter sponge cake recipe, and it is easily made into chocolate with the substitution of some of the flour with cocoa.
now, i'm assuming you meant marble cake, and not a cake that looks like marble or a
marble (like the round toy). to decorate a cake to look like marble, streak rolled fondant in the colour of your choice.
making a cake to look like a marble would be mighty tricky, since marbles are dark and translucent.