You define which disks to use for your scratch disk in Preferences-Performance. Ideally, a scratch disk is a separate disk drive with lots of free space on it. Every time you load brushes, swatches, make an edit that gets recorded to a history state, etc. information is written to the scratch disk. If you only have the one disk drive on your computer that you are running your OS, Photoshop, saving files, etc, it's possible to use up all the free space for scratch and not be able to save your file!
To immediately free up some scratch space that Photoshop is using, go to Edit-Purge, and remove some (or all) of the saved scratch information. Aside from that, make sure you delete anything not needed on your scratch disk(s) to free up more space. Buy an extra external hard drive of at least a few hundred gigabytes and set that as a scratch disk to avoid running out of scratch disk space.
Your scratch disk is wherever you told Photoshop to put it in Photoshop's preferences.
If you haven't changed anything, then it is on your boot disk.
You can specify an additional scratch disk in Photoshop's preferences, clean some space off your existing disk, or work with smaller files that fit within your current disk space.