Let's look at two pictures of a wave. In one we'll plot y as a function of x, set the wave going and then hit the pause button. This is like taking a photograph of the wave, so we freeze it at one instant in time.
What is the wavelength of our wave? It's the distance between two particles that are 2p out of phase with one another. For instance, it's the distance between one peak and the next.
In our other view we'll focus on the motion of a single particle, plotting y as a function of time. Again look at two particles that are 2p out of phase with one another. Here the "distance" between them has units of time - it's the period of the wave.