can be transpose
d by putting it into a different musical key
The most straightforward way of doing this is to just change the pitch; this is called chromatic transposition, and it will work perfectly under the tuning system of equal temperament.
This can be used to make existing music fit the range or tuning of an existing instrument.
In most Western music (both classical and popular) we can also perform diatonic transpotision. In this process, all notes are moved up or down in the scale by a fixed number of notes - where the scale is formed by the seven selected notes of the major or minor key.
Generally, this is not a meaningful thing to do: melodies and harmonies change, and may even become nonsensical. There is a common exception, however. Every major key is a minor key transposed up by a third; e.g. C major is A minor except that it starts on C instead of A. So all music in a major key can be put in a minor key by diatonically transposing down by a two notes on the scale, and vice versa.
However, this only works for notes on the scale. Diatonically transposing a piece in C major to A minor turns every C to A, every D to B, every E to C; but a D# has nowhere to turn to, as there is no note between B and C.
So the major/minor change only works for all music that is firmly based in the
major resp. minor scale, and only for notes that are actually on the scale, and this is true for diatonic transposition in general.