Just as a guess, I think you wired the hot wire to the ground, so you trip the breaker immediately.
Ceiling fans with a light fixture typically have two power inputs, one for the light and one for the fan. The wall switch controls the light, the fan is always hot and is controlled by the pull cord. You should have a white, a black, a red and a green or copper wire coming in from the ceiling. One the fan side, y0u should have something similar. You will have to look at the fan manual to see how the other wires line up.
If there are two black wires
1) Turn the light switch off and see which wire is hot.
2) Turn the light switch on and see which additional wire is hot.