That's a really good question, and an important one. Here's what I'd suggest:
Learn and memorize the 12 major scales. On the horn AND in your mind. Start with C major since it has no flats or sharps. What you want to learn are the notes and where each note fits in the scale, numerically. For example, in C maj, the '1' is C (that should be pretty easy to remember), the '2' is D, the '3' is E, and so on. What you are shooting for is instant recall. The goal is to be able to instantly know that the 6th in C major is A, without having to think about it. Of course you'll have to think it out during the learning process, but eventually you'll just know. The 4th is F. And so on.
Do this with every key. In F#, the 4th is B, the 7th is F (well, technically it's E#, but thinking enharmonically works fine, at least from an ear/improv standpoint). In the key of B, the third is D#, the 6th is G# (ok, I had to think for a second to get that one, but on the horn I'd be able to finger it immediately). In G, the third is B, the 7th is F#, the 2nd (9th) is A, and so on.
Does this make sense? Hopefully so. I guarantee you it will work. And there will be many applications, not the least of which is spelling out chords: In Cmaj, 1, 3, 5, 7 = C E G B, a major 7th chord. Then when you get to minor, dominant, etc, it's simply a matter of learning the 'formula.' So a dominant chord is 1 3 5 b7. So C7 = C E G Bb.
I could go on, but hopefully you get the point. Don't get bogged down, just start with the 12 major scales, one at a time. Learn them on the horn and in your head. If you have a keyboard, you can use that also.