To summarize the breeding section of PokemonDB:
Each Pokemon has one or two Egg Groups. Pokemon can only breed with other Pokemon in their egg group. There must be one male and one female Pokemon, and the resulting egg will be of the female Pokemon. Pokemon of the Undiscovered egg group cannot breed at all.
However, Ditto can breed with any Pokemon regardless of egg group or gender (except for the Undiscovered egg group). The resulting Pokemon will be the one that is not Ditto, and Ditto cannot breed with itself.
Traits like Shinyness are not passed down from parent to child. However, it is possible to pass down certain traits, such as Natures, IV's, and Abilities, if the parents hold an item while having the egg.
Hope I helped!