You didn't mention the camera make or model so my answer will have to be general.

This usually occurs because the card was not formatted by the camera prior to it first being used to take photos.

Use the camera to format the card.
If the camera will not format the card, you will have to insert the card in a card reader attached to a computer.
Use the computer to delete all files and folders found on the card.
Then put the card in the camera and it should then let you format the card with the camera.

...
..
.