Does the metric in the Theory of Relativity actually satisfy the definition of a metric? Allow me to give a brief introduction to the topic, which has to do with physics; my question will still be a mathematical one. I think my question is aimed at people with a background both in physics and in mathematics.

I am familiar with the Theory of Relativity, in which spacetime is described as a four-dimensional manifold with a notion of distance (invariant under the Poincare group). This distance is described by an object that is called the metric or the metric tensor. A simple example of such a metric is the Minkowski metric. This metric (tensor) is (at least as evaluated in some coordinate frame and up to certain conventions) described by the 4x4 matrix $\eta = diag(-1,1,1,1)$. As a result, the spacetime distance between two points $x,y$, described by their components $x^\mu, y^\mu$, $(\mu=0,1,2,3)$, is given by
\begin{equation}
d(x,y)=\eta_{\mu\nu} (x^\mu - y^\mu)(x^\nu - y^\nu)~,
\end{equation}
where summation over repeated indices is implied. Now comes my question. When we take $x$ and $y$ to be given, for instance, by $x = (2,0,0,0)$ and $y=(1,0,0,0)$, then we arrive at a negative distance:
\begin{equation}
d(x,y) = -1~.
\end{equation}
Now, regarding the Theory of Relativity, this is quite possible, but recently I came across the formal definition of a metric. And one of the conditions stated that a metric maps each pair of points in the space to a non-negative real number. But in our example of the Minkowski metric, this is clearly not the case. So the Minkowski metric does not seem to satisfy the definition of a metric.

So, is the metric in the Theory of Relativity just a different kind of metric, or does it have to do with a distinction between metrics and metric tensors? Or am I missing something here?
Metric in the sense of metric spaces and metrics in the sense of (pseudo)Riemannian metrics are very distinct concepts. It is one of the cases where the limits of language causes two or more distinct concepts to share one name. For other instances of this in mathematics consider the word "normal" or the word "distribution".
It is not a metric because, as you say, distance must be positive. So they use a different word for negative distance, called pseudometric distance. That is, the interval is not called a metric, it's called a pseudometric. That distinction is the most important fact in special relativity.  In my opinion, pseudometric (negative) distance is the most important concept in understanding what space, time, and the universe really are.