From widely reported news, I understand that Parliament voted overwhelmingly against the PM's plan for Brexit, but then had a no confidence vote that did not pass. If it had, it would have triggered snap elections.
Not immediately. The Fixed Term Parliaments Act 2011 states that if a government loses a vote of no confidence, then the parties have two weeks to form a new government and win a confidence vote. Only if that fails to happen is there an election.
That new government could be made up of one or more opposition parties; or it could be the governing party under a new leader; or some other arrangement.
Reports suggested the MPs in her party did not vote no confidence because then in the snap election their seat would be at risk.
Yes, and at a higher level: Jeremy Corbyn could have become Prime Minister. Whatever Conservative MPs might think about Theresa May, the idea of a Corbyn government appears to be much worse.
Could they vote her out as PM and vote in a different PM? In other words, keep the composition of Parliament the same until the next fixed election but change their leader sooner.
Indirectly. As gnasher729 mentions in their answer, Conservative Party rules mean that their MPs cannot remove Theresa May as party leader until December 2019, as they already tried and failed to do that in December 2018.
However, if she had lost the (parliamentary) vote of no confidence, Conservative MPs might have demanded she resign so that they could attempt to form a new government under another leader. They would not be able to force her out right now, but that kind of pressure would make her position untenable.