Polytonality is a compositional technique in music in which a composer employs two or more keys at the same time instead of just one. For instance, one player may perform in C major while another simultaneously plays in E flat major. Each key used has a specific tonal center, which normally is the first note of the scale related to the key. By using more than one key, the composer establishes multiple tonal centers, which in theory makes the music more complex and interesting for the listener.
Even though musicians tend to classify polytonality as more of a contemporary musical method, by definition is is based entirely on tonal concepts that have existed for hundreds of years. In fact, ironically, more contemporary atonal music, which abandons the use of tonal centers altogether, technically cannot be polytonal because keys are only suggested or implied at best. Thus, it is better to see the technique as creative way to get a contemporary sound without abandoning tonal rules.
Due to the fact polytonality is fairly conspicuous, composers use it only when they purposely want to create a bold impact and put a contemporary spin on traditional tonality. The degree to which the polytonality is apparent depends on how closely the selected keys are related, however, because the multiple keys always end up harmonizing each other in some way and thus are never truly independent. For instance, if a work used F major and A major, the relationship would be the interval of a third, which is considered consonant and which is very common. If a composer wrote in F major and B major, however, the interval would be an augmented or raised fourth, which is a less common, dissonant interval that sticks out to the ear much more.
In its early forms, composers such as Wolfgang Amadeus Mozart used polytonality sparingly and more for comedic effect. Later, polytonality became a way for composers to emphasize that some degree of musical chaos could create a pleasing greater whole. The idea of these composers was that it is the dissonance, counterpoint and "fight" between players or sections that makes music interesting. One of the greatest composers in this respect was Charles Ives, whose famous "Variations on America" is hailed as a polytonal masterpiece.
Polytonality does not have to be present in the entire musical work, although it might be. Probably the simplest example of this would be players performing the same melody in parallel motion starting on two different pitches. More often, it occurs when the composer wants to build up to a climax.