Content type ids can be found out by look at the ctypes feature. Standard MS ones are typically of the form 0x01XX (where X is a hex digit). Note that content types can inherit. Inheritance is specified by the the first part of the content type id (i.e. the content type id begins with the id of its parent and typically appends two hexidecimal digits to this.
Note that when creating content types, it is best to do this in the elements.xml file of a feature. Note that your content type will inherit properties from whatever class is specified. It is worth noting that you can specify a new content type in a schema.xml file of a list feature (aka list definition), however inheritance from the parent class is not preserved if specified there (bizarrely).
Content type ids can actually be formed in two ways:
- as above, adding two hex digits to the parent content type
- by appending “00” then a guid without dashes or brackets
This msdn article gives more info http://msdn2.microsoft.com/en-us/library/aa543822.aspx.