For each word in a dictionary, all possible combinations of upper- and lower-case variants are generated.
In hashcat-legacy, this attack was implemented as a stand-alone attack mode. In hashcat there are two ways to do it.
With a table. The Table attack (-a 5) ships a case table, and this is the closest thing to the old stand-alone mode:
$ hashcat -m 0 -a 5 hash.txt words.txt tables/toggle.table
tables/toggle.table covers 618 characters in both directions, including Greek and Cyrillic, and each letter is decided separately.
With rules. The other way is a ruleset, described in Using rules to emulate toggle attack.
If our dictionary contains the word
pass1234
Hashcat creates the following password candidates
pass1234 Pass1234 pAss1234 PAss1234 paSs1234 PaSs1234 pASs1234 PASs1234 pasS1234 PasS1234 pAsS1234 PAsS1234 paSS1234 PaSS1234 pASS1234 PASS1234