Think about the complexity of design...
Speaking in terms of focal length, a prime lens (50mm f/1.8 for example) is going to be far less complex than a medium zoom that covers a range of focal lengths. As such, implementing a zoom is more expensive than the simplicity of a single focal length prime.
Speaking in terms of max aperture, a fast aperture lens (f/1.8, f/2 etc) requires a complex optical design. As such a lens with a fast aperture is going to be more expensive than a lens with a slower aperture (higher number).
Speaking in terms of image quality, a lens that corrects for things like chromatic aberrations, reduce flare, etc also requires a complex optical design (think Aspherical elements, fluorite, image stabilization, exotic lens coatings). As such a lens that corrects these issues is going to be more expensive than one that does not.
Now put them together...
Since there is no single aspect that determines price, you will find cheap primes and expensive primes as well as cheap zooms and expensive zooms.... there is no single generalization.
[EDIT]
Also another factor I forgot to mention is build quality. You will pay a premium in terms of build quality... USM, metal versus plastic etc...
[/EDIT]