The wave function is a mathematical device for dealing with probabilities. Lets say we haven’t measured a particles spin(a particles spin has to do with the particles magnetic properties), its spin can be either up or down. Then we say that its wave function is 50% up and 50% down. You might say that it’s completely wrong to say that the particles spin is 50% up and 50% down, clearly the particle already has a determined spin just that we don’t know it yet. But this doesn’t apply to quantum mechanics, a particle doesn’t take on a special attribute until measured. Now we come into something called a superposition. A super position is two or more states which exists simultaneously in an object, e.g. a particle which hasn’t got it’s spin measured yet to see if it’s down or up, is in a superposition of both down and up spin. The wavefunction also applys to a particles position, a particle doesn’t have to have a certain position but instead it can have a certain probability of existing on different places(which we’ll see later: smeared out electron). And this, again, doesn’t mean that the particle really has a certain position but we just don’t know about it, it doesn’t have any position at all, just probabilities of existing on some locations. When we then measure the particle and get a exact result, we say that its wave function has collapsed, and we now have a certain result without the probabilities.
It wasn’t very welcome(and still isn’t?) in the scientific world that properties didn’t exist until measured which meant that we couldn’t predict exactly how things worked. And there’s a famous experiment devised by Einstein, Poldosky, Rosen to prove that quantum mechanics(or more specific the Copenhagen interpretation which was the leading interpretation at that time) was wrong.