Format SD card on MAC
Most SD cards come pre-formatted in a compatible format. But if you need to reformat the card, use Disk Utility. It is located in Applications / Utilities. Once opened, select the SD card on the left side and press the Erase button. Select the Format to be ExFAT (or FAT, or FAT32 if you have specific requirements). Press Erase and the card will be cleared and ready to use.
Format SD Card on Windows
After inserting the SD card, it should come up on Windows Explorer. Right click on the SD card and choose Format. The default format is usually fine. It should have format exFAT. Press Start to erase the disk.