Ok I know how to hear a piece of music and tell where the resolution is. Like if a song is in A minor I know the chords in that key and how everything is centered around Am in some way. BUT what if somewhere in the song the note D and Dm start to feel like the tonic? Keep in mind that in this case you are only using chords diatonic the A minor only. I want to know if you would consider this some type of key change?
if the tonic has changed, then you have a key change. although keep in mind that there is a difference between tonicization and modulation.

a tonicization is a short-lived "key change" where other chords are brought in to create stronger resolutions to certain harmonies. for example, in the key of A minor, if an A major chord were used to tonicize a D minor harmony. if the phrase were to continue to an E major harmony (which would then likely lead back to a tonic A minor harmony), then D minor is said to be tonicized, but the key is still A minor.

a modulation is basically a large-scale tonicization, where, in the previous example, there would actually be a full-scale change to D minor, rather than a continuation of the phrase leading back to A minor.

tonicizations aren't generally considered key changes, but modulations are.
Anfangen ist leicht, Beharren eine Kunst.