Long press on the camera icon on the screen until the color changes to gray. Then you can remove it.
This turns off the recording, but it does
not unmount (aka "safely remove," "eject," or similar terms) the drive. At a minimum, its "dirty bit" will be set, and if any writes had not been committed completely to disk by the time you pull the drive, there
will still be filesystem damage. Thus, I strongly recommend that you perform a filesystem check on the disk, using a desktop or laptop computer, whenever you unplug a USB drive. It's probably better to do this before mounting the disk, if you can control this detail (most desktop OSes will mount the disk automatically as soon as you plug it in); but even doing it after mounting the disk is better than nothing. A single uncontrolled unplug isn't likely to do serious damage, but it can accumulate over time and ultimately create such a mess that you'd need to create a new filesystem.
Some people have suggested that Tesla began doing filesystem checks on USB drives itself, presumably when they're plugged in or at some other time, beginning with some unknown software update a few months ago. I can neither confirm nor deny this; but if it's true, this would mitigate the risk of filesystem damage, depending on when the check is done.
Note that a USB drive used for music will not, AFAIK, be written to, so aside from the "dirty bit" being set, there should be no damage to it; the preceding comments apply to the TeslaCam partition (or a USB drive dedicated to that purpose).