If I install Steam to an external drive, will it work when I plug it into other computers? Or does it depend on registry keys/some other computer-specific thing?
Steam will work on an external drive, and will run perfectly fine as long as you're not trying to simultaneously run it from the computer's internal drive.
Note: Even though installing on an external drive means the games / client themselves are on the external drive, you may wind up with your saves or DLC on the computer, rather than the external drive. (Exact effect depends on the game.)
Steam now has inbuilt support for creating new "Steam Libraries".
You can also manage your Libraries from Steam → Settings → Download & Cloud → Steam LIbrary Folders.
It should work on the same PC that you have your external drive plugged into when you install. This is because it does require some registry keys to function, which will be installed to the PC you have your external drive connected to when you install Steam on the external drive.