Compounds types are normally defined by the importance, or predominance (prādhānyam), of one or other element of the compound.
The first element is indeclinable and the second follows suit. For example:
अनुवादः anuvādah - repetition (anu ‘follow’, vādah ‘speech’)
These may be formed from nouns of all cases, but usually they are genitive, such as:
गंगातीर Gangatīra - 'bank of the Ganges' (Gangā ‘Ganges’, tīra ‘bank’)
A sub-class of Tatpurusha is the Karmadhāraya in which the relationship is nominative eg:
नीलकंठः Nīlakathah - a name of Siva (Nīla ‘blue’, kanthah ‘throat’)
Normally a pair or string of nouns, or adjectives, without any predominance.
सुरनरमुनि suranaramuni - 'gods, men and sages' (sura ‘god’, nara ‘man’, muni ‘sage’)
Is usually possessive, and refers to an element outside of the compound, such as:
पुराणमुनिना purānamuninā - 'by the ancient sage' (purāna ‘ancient’, muni ‘sage’) which refers to the composition ग्रथितां 'compiled by the ancient sage' Vyāsa व्यास
The Bahuvrīhi compound must agree with its antecedent in number, gender and case. In the above example the full phrase is:
व्यासेन ग्रथितां पुराणमुनिना
व्यासेन - 'by Vyāsa'
ग्रथितां - 'compiled' (accusative case of grathita)
पुराणमुनिना - 'by the ancient muni' (sage)
I have not covered the subtypes of each of the main types of compounds, but there is no need to go into too much depth at this stage. It can become rather academic.
Many more examples can be found online at various sanskrit learning websites.