So I am starting out with automata theory and I was reading a book and came across an example where the author tries to explain what exactly Nondeterministic Finite Automatas (NFAs) are. He gave an example of a language A such that:
$A = \{w \in \{0,1\}^*: w \text{ has a 1 in the third position from the right}\}$
He then constructs a NFA which is:
Now how he explained it is that the NFA "guesses" that the 1 is the third from right in the string and then it "verifies" that there are exactly two symbols remaining. If there are more than two remaining symbols, then the NFA hangs (in state $q_1$) after having read the next two symbols.
Now I don't know a lot about this topic, but from what I understand an automata can read a string only once. Also, the automata can proceed in either of the two options it has. So how is it that it will accept the string every time? Maybe some time it just stays on $q_1$ and never decides to go to $q_2$. Or maybe it goes to $q_2$ too early and hangs even though there is a 1 in third position from right.
It seems random, but the author mentions nothing about this. So I'm guessing I'm wrong.
Please someone point out what I'm not understanding right here.