Memory hard functions require a large amount of RAM to be solved.
Scrypt just adjusts the number of random variables that need to be stored compared to SHA-256.
Scrypt creates a lot of pseudorandom numbers that need to be stored in a RAM location. The algorithm then accesses these numbers a few times before returning a result. Generating the numbers is computationally intensive and as they are accessed a few times it makes sense to use RAM in conjunction with hashing power rather than generating them on the fly – a time and memory trade off in terms of optimising speed.
The main advantage of scrypt is that it lowers the advantage of ASIC Bitcoin miners in the network. This then means that there should be the possibility of more miners joining the network and contributing sufficiently to make it worth their while. Another possibility is there is less energy use as the total network power is less.