Quantum mechanics is very counterintuitive and difficult to understand but I will do my best to give you an answer to your question.
i dont understand how a particle can be in two places at once.
It's not actually the particle that is in two places, but it's infinite wave functions. I know you are thinking 'what waves?'.
One of the basis of QM is the wave-particle duality of matter. It has been observed through the double slit experiment that light will interfere with itself as the waves pass through each slit in a wall( board, etc). This interference will produce bands of light and darkness on a receptive screen on the far side of the wall. We also can see this behavior with water waves using the same set up. When one of the slits is covered up, the light just shines normally through the open slit.
Now, this same experiment was conducted using electrons. We all know that electrons are particles. So when this experiment was conducted, guess what was found-the electrons interfered with each other! This had to mean that the electrons exibit a wave like behavior as well as particle behavior. This all goes back to the probability of finding electrons in a particular place in an orbital.
This concept is further expanded to include ALL matter. Even us and everything around us. However, we don't notice this duality because the wavelength of matter waves is proportional to Planck's constant, which is extremely small.
Now that we have some background, let's address the question. The electron/double slit experiment was then conducted using ONE ELECTRON AT A TIME. Each electron was shot at the wall with the slits individually. To the surprise of everyone, the interference pattern showed up again! How could one electron interfere with itself? Remember, electrons = probablility.
Feynman proclaimed that each electron that makes it to the screen actually goes through BOTH slits! Even more astounding, he said that the electron actually traverses every possible path at the same time. The electron goes straight through the left slit. It also goes straight through the right slit, starts off going to the left then changes and goes into the right slit, and even goes around the moon and then enters the right slit. He assigned each one of these paths numbers so that the combined average was the same as the probability of the wave function. This is referred to as the 'sum over paths'. The paths cancel out and leave just one remaining.
This is how a particle (which is also a wave) can be everywhere at once. Remember when I said that even people are waves? Well probability says that a person can walk through a wall to get to another room because he takes all paths at once. Sooner or later, the one wave function that is not cancelled out will be the one that passes through the wall!
If all this sounds absurd, Feynman said it best: "[Quantum mechanics] describes nature as absurd from the point of view of common sense. And yet it fully agrees with experiment. So I hope you can accept nature as She is-absurd."