Simplistically the one that takes the message is the one that is set up to answer after the least time/number of rings. But it gets complicated fast.
Verizon like many carriers probably says they send calls to VM after 20 or 30 seconds, while your answering machine surely says 2, 4, or 6 rings. Hummm, how many seconds per ring? Don't cut it too close.
Next, if you have call waiting and decide not to answer a call that comes in while you are on the phone Verizon will conveniently send that second call to your Verizon VM.
Or if like me you don't have call waiting Verizon will send any call coming in to your number while it's busy straight to your Verizon VM. How nice of them.
Only real solution is tell Verizon to turn of the VM. If they will.
I've had to deal with this issue a lot over the past 3 years with several carriers. It's a PITA.