A wrinkled rug is generally flattened through the use of heavy pressure applied to the rug for a long period of time. It can also be flattened by rolling it in the opposite direction that it wrinkles.
A rug often becomes wrinkled from staying in storage for too long, however it can also be purchased that way from a manufacturer or become that way from certain pieces of furniture. As rugs are generally made to bounce back, they can be easily fixed with time and a little effort.
The easiest and most passive way to flatten a rug is to allow a heavy piece of flat furniture sit on the rug for a long period of time. A rug that is left undisturbed on the floor for a few weeks will also begin to flatten on its own, while placing a rug in direct sunlight for a short period of time will warm up and allow the fibers to loosen up, helping to release the wrinkles. However, it is important to not leave the rug in the sun for too long or the colors of the rug could become faded over time.
For stubborn wrinkles that are resistant to being smoothed out, having the rug steamed by a professional cleaner is an additional option. Often they are able to identify the exact nature of wrinkle, and offer better solutions as to how to straighten it out, along with cleaning the rug.