There are two ways of styling data in KML: globally and locally. (In this sense, "local" means local to the feature.)
A global style must have an XML id and can be referred to from any feature's <styleUrl>. A local style does not necessarily need an id and applies only to the feature in which it is contained.
The rules regarding inheritance, overriding and merging are given by example in this file.