Can I change from one scale to another.like think I am soloing on Bminor,can I shift from there to a A major scale?
You can switch scales anytime you like as long as it fits the music and underlying chord progression. A key change would be an obvious example. Have you got a particular song or chord progression in mind?
This chord progression is possibly in the key of B minor but is probably D major. The D major or B natural minor scale should work throughout. Both share the same notes. You could also try B minor or D major pentatonic.
For variation you could use pentatonics over each chord. B minor pentatonic over the B minor chord, D maj pentatonic over the D chord, G major pentatonic over the G and A major pentatonic over the A. Just different ways of using the same scale, i.e., the four pentatonic scales are still in the key of D major, there won’t be any outside notes.