The word 'soda' is a noun (a word for a thing) modified by the compound noun 'ice cream'. When a noun is used to describe another noun, it's called an attributive noun (or noun adjunct).
The term 'ice cream soda' is a noun phrase, a group of words consisting of a noun (soda) and all of its modifiers (ice cream).