Every so often the program creates a copy of files being edited prefaced with a '~'.  These are security copies.  When and where they are written is configurable.
To adjust the settings, go to [Settings], [Preferences] and click on the 'General' tab.  In the top left you'll see some settings for security copies.
The time between backups is not simply the elapsed time between saves, otherwise every open file would be regularly backed up, often unnecessarily.  It's the interval between saves for any design which currently is being edited.  Any action which generates an undo is one which counts as an edit, so any one of these triggers the timer.
The location allows you to choose where the security copies will be saved.  Although the default is to save with the design file, this isn't always a good option, as the working directory can become very cluttered, so there are two other possibilities.  You can save to a subdirectory - which will be created automatically if it doesn't already exist, or you can save to a single location so all the security copies are together in one place which can ease decluttering of old copies which may not be required.
You should also review the FAQ covering 'Backing up your designs'.