Motors and Generators are the same set up really, except in a motor the goal is to get the coil spinning (so you provide a field, current and that creates a force) and in a generator you want to generate a current (providing a field and a force).
A generator can produce AC or DC, depending on if you attach a split ring commutator or slip rings to it. A split ring commutator is used for DC. A slip ring is used for AC. This should be clear once you take a look into how each of the commutators function. Recall how AC and DC are represented when plotted (AC alternates between positive and negative, DC doesn't).
Just a generator without a commutator produces AC (this should be clear if you think about how the generator functions). The split ring commutator alternates the connections to the terminals every half turn, effectively adjusting it into DC. A slip ring doesn't do manipulate the current in that way, hence you would get AC being output.
The textbooks have good explanations of this. I also realise that I link to this web page a lot, but the animations here are really good:
http://www.animations.physics.unsw.edu.au/jw/electricmotors.html#mandg