When you are on active duty you are taxed according to the state you claim residency in. That means if you claim that you are a Texas state resident, for example, then no matter where you are stationed your income will not be taxed by the state you are stationed in. If you are a California resident you will pay California income tax each year regardless of where you are stationed.
Claiming residency requires submitting paperwork through your finance office. It is illegal to claim residency solely to avoid paying income taxes. In general, you have to have lived in that state for a certain amount of time, have a mailing address, have registered to vote, gotten a driver's license, etc.