In Freud's psychoanalytic theory of personality, the primary process works to resolve tension created by the pleasure principle. The pleasure principle is what drives the id and seeks instant gratification of all needs, wants, and desires. When the pleasure principle creates tension, the id must find a way to discharge this energy.
The primary process acts as the id's mechanism for discharging the tension created by the pleasure principle. Rather than act on dangerous or unacceptable urges, the id forms a mental image of a desired object to substitute for an urge in order to diffuse tension and anxiety. This image can take the form of a dream, hallucination, fantasy, or delusion. For example, if you are hungry, you might form a mental image of a slice of pizza or a deli sandwich. The experience of this mental image through the primary process is known as wish fulfillment.
However, problems also result from using the primary process to dissipate the energy of the id. The primary process has no way to distinguish between the fantasy image and reality. So while the primary process can be used to temporarily reduce tension, it is only effective in the short-term. Your mental image of the food you are craving will only satisfy you for so long. Eventually, the tension will return when needs go unfulfilled.