Covariant and contravariant bases are dual to one another and are physics nomenclature for constructs that arise in differential geometry. The problem here is that physicists often need to use differential geometry (for example, for relativity) long before they have seen a proper course on differential geometry.
I will try to provide you with an extremely quick view of what contra/covariant bases are, and how you move between them.
First, let $M$ be a smooth manifold. For our purposes, the most important part of being a smooth manifold is the Local Euclidean property, which says that for each point $p \in M$ there are open neighbourhoods $U \subseteq M, \tilde U \subseteq \mathbb R^n$ and a homeomorphism $\phi: U \to \mathbb R^n$ for some $n$; that is, if we look closely at the manifold, it just looks like $\mathbb R^n$. If we denote $\phi$ component-wise as $\phi = (x^1,\ldots,x^n)$ then we can describe points $q \in U \subseteq M$ in terms of $(x^1(q),\ldots,x^n(q))$ in $\mathbb R^n$.
The next step is to consider the tangent space to $M$ at the point $p$, denoted by $T_pM$. There are quite a few ways of defining this guy, my favourite being as derivations on $M$ through $p$, but for intuition-sake, think of $T_pM$ as the collection of all vectors through $p$ which are tangent to $M$. This is a vector space, and so has a dual space $T_p^*M$ called the cotangent space.
The coordinates $(x^1,\ldots,x^n)$ we defined at $p$ induce a basis on the tangent space, and that basis is typically written as $ \left\{ \left.\frac{\partial}{\partial x^1}\right|_p, \ldots, \left.\frac{\partial}{\partial x^1}\right|_p\right\}$, but for our purpose let's call it $\{ v_1,\ldots,v_n\}$. Similarly, there is an induced basis on the cotangent space (which turns out to be the dual basis), often denoted $\{dx^1,\ldots,dx^n\}$ but again, for our purposes, we will write $\{v^1,\ldots,v^n\}$.
These are your covariant and contravariant bases, respectively. But you are now likely confused as covariant vectors have subscripts and contravariant vectors have superscripts. This is because the Einstein summation convention says that that an arbitrary vector $v= \sum_{i=1}^n a_i v^i$ should be written by omitting the summation sign, so that $v = a_iv^i$. But the $v^i$ are in a sense assumed to be given, so the physicists shorten it further and just write $v = a_i$, and now you get the subscripts that you wanted. The same argument works for contravariant vectors.
The next question is how to move between them. A priori, there is no reason to suspect this should even be possible: They live in completely different spaces! However, we can define a Riemannian metric on $M$ which, intuitively speaking, is an non-degenerate inner product on each tangent space. This is what the physicists call a metric (tensor). Non-degenerate inner products on finite dimensional vector spaces give a natural identification between the vector space and its dual. More precisely, if $\langle\cdot,\cdot\rangle: V \times V \to \mathbb R$ then we can define an isomorphism $V \to V^*$ by $v \mapsto \langle v, \cdot \rangle$ (You can actually more generally define what are called musical isomorphisms). In local coordinates, our inner product can be written (in Einstein convention) as $g^{ij}v_i \otimes v_j$ (or just $g^{ij}$ if we omit the vectors), and hence the isomorphism above corresponds to
$$ v \mapsto \langle v, \cdot \rangle , \qquad a_i \mapsto g^{ij} a_i.$$
Again by laziness, we avoid carrying around the metric tensor and just write $a^j = g^{ij}a_i$, which is the concept of contraction (better known to mathematicians as the interior product).
You can of course move the other direction as well. In local coordinates, the metric tensor $g^{ij}$ looks like an invertible matrix. Let $g_{ij}$ be its inverse, in which case $a_j = g_{ij} a^i$.
It is definitely a lot to take in, but if you understand the rigorous mathematics behind these things, the physics actually becomes significantly easier.
Let $V$ be an $n$-dimensional vector space over your favourite field with basis $e_1,\dotsc,e_n$ und $V^*$ its dual space with dual basis $e^1,\dotsc,e^n$.
Strictly speaking the vector spaces $V$ and $V^*$ do not have any vectors in common. But what is meant by “almost the same” is that there is an isomorphism of vector spaces $\varphi\colon V\rightarrow V^*$ defined by $\varphi(e_i) =e^i$ for $i=1,\dotsc,n$ (and extending by linearity). Under this isomorphism $x = \sum_{i=1}^n x^ie_i$ is mapped to $\varphi(x) = \sum_{i=1}^nx^i\varphi(e_i) = \sum_{i=1}^n x^ie^i$. So in your notation you have $x_i = x^i$ for the coefficients $x_i$ of $\varphi(x)$ with respect to the basis $e^1,\dotsc,e^n$.
Under the isomorphism $\varphi$ you identify $x$ and $\varphi(x)$ with each other, although they are not the same, as they live in different vector spaces.
Beware that the isomorphism $\varphi\colon V\rightarrow V^*$ depends heavily on your chosen basis $e_1,\dotsc,e_n$ of $V$. This means that without a basis of $V$ you cannot (easily) identify $V$ with its dual space $V^*$.
Best Answer
It is not easy to understand what you want to know.
The concepts of "covariant" and "contravariant" are related to the behavior under a change of basis of a vector space $W$. See my answer to Why is tensor from a vector space covariant, not contravariant?
These concepts only make sense for finite-dimensional vector spaces. If we are given a basis $\{e_i\}$ of $W$, the dual vectors $e^*_i$ only form a basis of $W^*$ if $\dim W < \infty$.
If we look at both $V$ and $V^*$, we consider bases for $V$ and their dual bases for $V^*$. These are the fundaments for denoting basis vectors resp. components as covariant and contravariant.
Of course we may change perspective and consider bases of the abstract vector space $W = V^*$. Then we get decompositions of vectors as linear combinations of contravariant components times covariant basis vectors. But this means that the starting point is no longer $V$ with its bases but $W = V^*$ with its bases. A basis transformation on $W$ is dual to a basis transformation on $V$, and this flips "covariant" and "contravariant".