Depending on how long you are storing the plane, there are different options.
Some planes may be used or sold in the future. They are just waiting for the market conditions to improve so that the owner can afford to operate it again, or someone else would be willing to buy it. Some planes are too old for anyone to want to buy them. In this case, they are most useful to the current owner, so they store them in case they will be useful in the future. Another possibility is spare parts. While the plane is stored, it can be slowly disassembled to provide parts for other aircraft still in service. Once all useful parts are removed, it will be chopped up into scrap metal.
Recently, some new aircraft are being stored until they can find more pilots. There is also a case where the Air Force decided to purchase some planes, but later decided they didn't really need them. It's cheaper to send them to storage than cancel the contract, so straight to the desert they go.
You can rent hangar space somewhere to store the plane. This is much harder to do for larger planes, and hangar space is expensive and limited. However, it obviously offers the best conditions for the plane, where it can be protected from the weather. This is more likely to be a short term solution unless the plane is very important (or the owner has deep pockets).
Another option is the "boneyard:"
Areas like the US southwest have very low humidity year round, which reduces the amount of corrosion on an airframe. Airplanes are designed to be outside most of the time anyway, so they will hold up pretty well. Windows may be covered to keep the internal temperatures down, and certain gaps may be covered as well. Small airplanes may be completely wrapped in plastic.
Some examples of this include the boneyard at Davis Monthan AFB in Tucson, AZ, where the US military parks its planes, and nearby Pinal Airpark, where many civilian aircraft are stored.