Welcome to Android Central! Which phone? I'm assuming it's a Samsung phone, since it sounds like you booted into Download Mode (aka Odin Mode). As long as you're not connected to a computer via USB and downloading a system firmware file, it's ok to power the phone off. If the battery is removable, simply pull the battery for 10 seconds, then put it back in and power back on. If the battery is not removable, then press and hold Power and Vol Down for about 15 seconds to force a shutdown. Then power on normally.