The value g(q,a) is the state reached from state q by the transition labeled by the input symbol a. We can also say that for the word w, g(q,w) denotes, if it exists, the state reached after reading the word w in the automaton from the state q.
For reasons of economy we allow g to be a partial function.