Individual notes can manipulate the harmonic context, which means the listener's assumptions about what is the tonic note, what intervals there are around it, and what is the current balance - are we standing up straight at rest on the tonic, or are we leaning one way or another away from balance. But a single note can do only a little. Chords have multiple sounding notes at the same time and they are more powerful harmonic bulldozers.
When you hear a strongly played note that's not included in whatever set of possible notes around the tonic you had in mind, it begins to alter your harmonic context. If an "outside" note is strong enough, played on a strong enough beat long enough, then it switches a "scale slot" in your mind to a different position. For example if you're in C major and consider the C major scale as your current surroundings, and you hear a D major chord which has an F# note, then the F scale slot gets switched to sharp position. Click! At least temporarily. If you then hear an F chord, the F scale slot is returned back to natural position. Click! On a sheet music staff these temporary changes are denoted with accidentals on the F position, first a sharp accidental, and then a natural accidental when the slot is changed back to natural. (Or if the return back to normal doesn't happen inside the same bar, the next barline cancels the accidental, but that's just notational practice.)
These Click! Click! switchings create feelings. They make you re-consider the harmony. Some changes can even move the tonic, and this is called a "modulation". Some changes only change some scale degrees, for example in C major, a C - C7 - F chord progression temporarily changes the B scale slot to B flat mode for the duration of the C7 chord. Or if you're in C, and you play C - F - Fm - C, then during the Fm chord, the A scale slot is forced to flat position. The rest of the scale degrees aren't mentioned by the Fm chord, so you are free to imagine anything about them.
A soloist can produce phenomena like this by superimposing notes from different scales over the backing chords. For example if your song is in C major, a jazzy trick is to play notes from C minor or Eb major scales. This creates a certain ambiguity when your ear starts to think ... wait a second, is this C major or C minor or both at the same time. Some notes are the same, some are different. This effect is used in blues and jazz by deliberately switching the scale back and forth between minor and major settings, partly or as a whole. It's a standard jazz trick - switch between parallel major and minor feelings, and you can also see it as moving the tonic by 3 semitones. Altering the mode creates feelings.
Your Am - F#m example can be seen as a standard jazz trick. Click! Click! Scale positions switching to different settings. Some people call that "borrowing" from other modes or keys. If your borrowing or scale change lasts long enough, your ear eventually settles down in the new position and starts to consider it the new permanent home. Try it, play the F#m for a few minutes. At some point you have completely forgotten about the Am and C.
Not realizing that outside-scale notes just change the harmonic context seems to be a problem for many people who think that the initially declared seven scale notes are a very rigid immovable structure. But in minor key tonality, a scale modification usually happens every time there's a dominant seventh chord. When you play Am - Dm - E7 - Am, then during Am and Dm, a G melody note feels just as fine and acceptable as a G#. But during the E7, the chord's third i.e. G# forces the G scale slot more firmly to sharp position, so you'll most likely use a G# melody note there. But after that chord is over, the G slot is free to move back to natural position.
If you want to try "milking" this phenomenon, just repeat the chords F and F#m. Over the F, try playing things from the A natural minor scale, and over the F#m, play things from the A major scale. Particularly the notes which are altered by the changes, for example C# over F#m and C over F. Here is an example song:

One more extra thing to that example song. If you want all of the changing notes to be explicated, make the backing chords F#m9 (F#, A, C#, E, G#) and Fmaj9 (F, A, C, E, G).