It seems to be a popular ingredient in Asian (esp. Chinese?) food. I encountered them on pork spareribs, and some side dishes. Apparently it turns everything completely black when it is added.
I can rule out soy sauce (which is too salty and tastes entirely different) and I realise that this question is rather vague. What additional information could I provide?
Edit: I can rule out oyster sauce. I asked in a restaurant what the black stuff was, but either she didn't understand me or she didn't want to (all she told me was that it contained salt). Finally she said she made it herself. Anyway, I bought Hoisin sauce:
and I think it's as close as it gets (perhaps the restaurant uses a slightly different version of the one I bought, as mine is a bit saltier and a bit less sweet).
Update: I finally discovered the exact sauce I was looking for. It turned out to be Black Bean Garlic Sauce.