This is a very basic property of quantum mechanics which is summarized by the Heisenberg Uncertainty Principle. Essentially, the fact that the speed and position cannot be simultaneously known follows from the fact that "particles" are really waves. Thus, this just boils down to a very simple property of waves and fourier transforms. So imagine that you have a particle localize at x=0. In terms of its wavefunction, you would have something like a guassian (bell curve) centered at x=0. You could imagine the particle precisely at x=0 but this would just be the limiting case of a bell curve so it doesn't add anything new to the discussion. Now, this bell curve may be written as a sum of simple sine and cosine waves via fourier transforms. Each one of these sine/cosine waves represents a particle moving with a particular momentum. (Actually, sine waves are a superposition of left moving and right moving waves.) As with any wave phenomenon, there is a dispersion relation which tells you how the frequency relates to the wavelength, and hence you can get the velocity as v=(frequency)*(wavelength). Thus, the "velocity" of the bell curve representing position is just a superposition of all the velocities of the waves making up the bell curve. It turns out that the sharper the bell curve is (the more localized) then the more waves of larger velocity (momentum) are needed to represent it using fourier transforms. Thus, the uncertainty in the velocity is larger.
This may sound complicated because one is not normally used to thinking about particles in terms of waves. However, as far as fourier transforms go, this can be understood very easily in the context of sound. There is an analogous relationship between frequency and time for a sound wave which says that you can't know the frequency and duration of a sound precisely at the same time. For example, middle C is around 261 Hz. The uncertainty principle says that I can't determine the duration that middle C is played to an accuracy greater than 1/(261 Hz), or about .004s. Why? Simply because .004s is the period of middle C and if I'm playing a note for less time than it takes for the sound vibrations to oscillate once then there's no sense in saying that you're even playing that note! It's hard to develop an intuition for how this applies to a particle, but the mathematics is the same.