macOS / OS X
Install homebrew then run brew install swi-prolog. You can now run the Prolog shell from the command line with swipl.
Important: do not install from the official website, you will get crashes.
Windows
Install from the official website (you need at least a typical installation).