You would need to do that on a computer. In most cases the tablet won't be able to do the formatting itself.
Also, please note, anything you had on the SD card, will be gone now. Formatting would have removed it all.
For future reference, it is much simpler (and safer) to leave the card in the device it is being used in (tablet, phone, etc.,) and plug that device into the computer you want to connect it to via a USB cord, or even via Bluetooth. This way you can move what you want from the device with the card, to whatever other device, and not risk card issues like this one.