Example 1: Greg asked Jan to marry him and she said yes on the spot. She didn't need time to think.
Example 2: In the United States, it's customary to open gifts on the spot, as soon as they are received.
Explanation: on the spot can be used the same way as you'd use the word immediately
In example 1, Jan said yes immediately to Greg's proposal. In example 2, it explains how Americans usually open gifts immediately after they are received.
This idiom comes from Reading Horizons 1st Edition which is used in the level 6 Reading/Vocabulary classes. For more information, please visit idiomstudy.blogspot.com