Based on your comments, your sourdough is probably OK.
It is not uncommon for an older sourdough to get a blue-grey, sludgy mold in the water on top of the sourdough, especially if you're not splitting the dough often enough. This is not fatal. The steps to remedy it are:
- Pour off all the water on top of the sourdough.
- Scrape off the mold around the sides of the jar and the very top layer of the sourdough.
- Spoon out the sourdough, trying to let at little of it swipe against the sides of the jar as possible.
- Split the sourdough as normal. Yes, you can use the other half to make stuff, it's completely safe.
- Put the culture you're saving back in a new, clean jar.
- Clean the old jar and run it through the dishwasher.
I've recovered my sourdough from blue mold several times this way. Actually, I make it a practice to swap jars every time I split it; that helps a lot.
Jacek is correct that if the sourdough smells fecal, or if it's fuzzy, then it's not salvagable. Red or yellow molds are also bad news.