How PDA decide when and which state to transform to?

[1] gives an example for PDA which contains rules of:

(p,e,Z,q,Z)
(p,e,A,q,A)

and says,

The third and fourth instructions say that, at any moment the automaton may move from state p to state q.

So, how does PDA know when it needs to move from a state to another?

• I don't think the phrase "at any moment" signifies any ambient time ticks. It is supposed to be read as "if the automaton is in state p then it can transition to state q under no additional constraints" Apr 20 at 20:01
• So, if I have a PDA and an input string which the PDA accept, a single run of the PDA, e.g: answer=PDA(input), may give me a wrong answer? Apr 20 at 21:01

In contrary, nondeterministic automata may have several distinct transitions from some states. Each transition gives a different computation path, so the path is not determined by the input anymore but there may be multiple paths corresponding to a certain input. There are several ways to define the language with regard to nondeterministic automata, but the most common one is to require having at least one accepting path. (The other way may be to require all paths to lead to accepting state, not a single one, thus replacing $$\exists$$ with $$\forall$$; it may be convenient in defining complexity classes like co-NP.)
• Consider an example from first-order arithmetics: we can define the predicate "number $x$ is composite" as $\exists y: 1 < y < x \vee x \mod y = 0$. However, this definition does not provide us with efficient ways of computing $y$ given $x$. Apr 20 at 22:46
• Replace $\vee$ with $\wedge$, that's a typo. Apr 20 at 23:02