Where do extra planes come from?
In my experience, having permanent airplanes standing by as spares does not really happen. Based on historical data potential realtime spares, airplanes with potential availability on any given day, can be pinpointed for reschedule or delayed maintenance, should the need arise. 

In reality, often the "spare" as you called it, is an airplane that can be pulled from another trip with a subsequent replacement available causing less delay than the flight generating the need for the spare in the first place.

At some airline "hub" locations, maintenance is being performed on aircraft and those aircraft can be used as spares, assuming the checks or maintenance is complete or can be delayed.

Two important points though:


It is extremely costly to have "extra" airplanes standing by to replace an aircraft that may go out of service.  Swapping aircraft is sometimes quite difficult because the type aircraft scheduled may not be available.  An alternate aircraft (different type) poses difficulty because the crew that was going to fly the B737 you were scheduled on, could not fly a substitute Airbus, for example (they either would not be qualified or not current/legal to fly the different type at a moments notice). 
The airline's SOC (Systems Operations Control) or similar has a difficult challenge on most occasions dealing with maintenance delays or cancellations. It is not uncommon for the flight to just be cancelled and have the passengers put on later flights.  However, the airline's Operational management people are experienced at minimizing actual delays and maximizing aircraft utilization.