I hold it still. With a DSLR, just up the shutter speed set it to F2.8 and turn off the flash. My fish are always swimming in the open so it makes it easy.
The easiest setup is to mount a flash on your camera's hot shoe. Angle the flash head to the position that approximates 45 deg. Attach a small white card to the flash head with a rubber band. Two business cards, side by side, will do the trick, though something a bit bigger it better. Flash is on manual setting. Automatic settings won't work. Camera at ISO 400, aperture at f/8 or f/11, shutter speed the fastest speed that your camera will synch with the flash. Unless your camera can track fish in its AI Servo mode (doubtful) you'll have your best luck manually focusing. To get the exposure right you don't change the camera settings. You change the output from the flash. Start at full power and work your way down until you get the right exposure.
To take pictures, get something to sit on that allows you to hold your camera comfortably at mid-tank height. Wait for the fish to come to you. Chasing them up and down the tank will just make you tired. Look for places where fish naturally stop, turn, emerge from an opening and pause, etc. Those are the places to get your best shots. It's very difficult to get fish in focus if they're swimming across the tank. Also note that all of this takes practice.
Gary
A couple of shots so this thread has some images in it.