Just to add a couple more comments, there are some decoder brands with unique features that will only work on systems by the same manufacturer. An example is Digitrax's "transponding" feature on some of their decoders which allows a Digitax command station to know where on the layout the train is. Command stations of other brands wouldn't have a clue what to do with that specialized information.
On the other hand, the NMRA compliance that Squidbait referred to means that that same Digitrax decoder's core features - such as address, start voltage, momentum, etc. will work on any Lenz, NCE, EasyDCC, Zimo etc. system. (and vice versa for decoders of those other brands on a Digitrax system).
Check out the following site - lots of good stuff here:
http://www.wiringfordcc.com/intro2dcc.htm