You just use the normal syntax: Format x: For x: type the drive letter which the memory card has been assigned.
However, you should only format a memory card using the device you intend to use it in (eg camera or cellphone).
If there is a "Lock" switch on the edge of the card, move it to the unlocked position before trying to format it.
if the card won't format in Windows or in the device, it won't format from a command prompt either. It means the memory card is faulty and it should be thrown away. Then of course buy a new one.
If there is no such a slide displayed above, you should follow the steps in this article to remove the write protection: *****How to remove write protection from a drive or memory card? *****
If there is nothing important on this memory card, you could directly format it on your computer.
But, if there is something important, you need a memory card recovery freeware before the format: