You may take a fast look at the examples section of the man page.
SMART does test on the fly, not directly visible to the operating system, when ordered to do so - otherwise, SMART will just do some basic tests. But the overall default configuration is dependent on what the manufacturer of your hard drive / solid state drive / tape drive has implemented.
Keep in mind, when you order SMART to do some self test, this will use internal I/O operations of the drive. Meaning, if you order your drive to do a long self test, your drives performances will be slower than usual, cause your drive is performing the physical self test, checking block after block...
So long-self-tests should not be done every time, as they reduce performance of your drive, while test is going on.
Commands you issue to your SMART capable drives via smartctl are valid until otherwise commanded or after full system power off (meaning, issued commands might survive a soft reset of the machine).
I recommend using default auto settings of your drives.
At system boot, you once tell your drives to start periodicly scans in an automated way, you can do this via:
smartctl --smart=on --offlineauto=on --saveauto=on /dev/sda
This will start to perform several, regular and periodic tests, in a performances friendly fashion for drive /dev/sda in background (not directly visible to the operating system).
Then you can check the health of your drive using the command smartctl -H /dev/sda, or smartctl --health /dev/sda. If this command returns an error, this usually means that either the drive is already in failure or the drive is predicting to go into failure within the next 24 hours. So performing a periodic check of at least every 12 hours is recommended. When a failure has been found, you can use smartctl -a /dev/sda or smartctl --all /dev/sda for more info. Usual, you don't need to check more often than for every 4 hours. As the automated scans probably will only run every 4 hours (but this depends on the manufacturers default settings).
PS Linux machines usually have already an automated SMART check enabled, using a daemon (service), often just named as smartd.service. You can check it's status via systemctl status smartd.service and/or watch its logs via journalctl --unit smartd.service