How does the set-theoretic relations and "is less than" relation fit together? If $x < y$, then there lies a relation between $x$ and $y$, the "$\text{is less than}$" relation. And $x$ is related to $y$ by the "$\text{is less than}$" relation. Since "$\text{is less than}$" might not be the only relation that lies between $x$ and $y$, they can be related by other relations too. The idea that $x$ is less than $y$ is a relation that lies between $x$ and $y$. The idea is the relation.
Let $A = \{0, 1, 2\}$ and $B = \{1, 2, 3\}$. Then the Cartesian product of $A$ and $B$,
$$
A \times B = \{(0, 1), (0, 2), (0, 3), (1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3)\}
$$
The set of all the ordered pairs whose first elements are related to their second elements by the relation "$\text{is less than}$" is
$$
R = \{(0, 1), (0, 2), (0, 3), (1, 2), (1, 3), (2, 3)\}
$$
We can see that $R$ contains all those ordered pairs whose elements are related by the "$\text{is less than}$" relation. Therefore, knowing which ordered pairs belong to $R$ is virtually the same as knowing which elements of $A$ are related to which elements of $B$. So, now, if $(x, y) \in R$, then $x$ is related to $y$ by "$\text{is less than}$" relation because we know that $R$ contains only those ordered pairs whose elements are related by the "$\text{is less than}$" relation. But when $(x, y) \in R$, we don't say, $x$ is related to $y$ by the "$\text{is less than}$" relation, instead we say, $x$ is related to $y$ by $R$. Why can we do that? How can $x$ be related to $y$ by some set? Is it because $R$ represents the "$\text{is less than}$" relation? (More on this below)
If the idea — $x$ is less than $y$ — is the relation, then why is $R$ defined as the relation? I believe $R$ is the set-representation of the "$\text{is less than}$" relation. But I can't see how it is representing that relation.
We know, that the "$\text{is less than}$" relation is not limited to $A$ and $B$, it also lies between the elements of the set of real numbers. If that's the case, how can $R$ represent the "$\text{is less than}$" relation?
And when we say, a relation from $A$ to $B$, do we mean there lies a relation between $A$ and $B$ or between the elements of $A$ and $B$? What exactly do we mean by a relation from $A$ to $B$?
Since the definition of a relation from the set-theoretic perspective is correct, I can define a relation
$$
R = \{(a, 1), (b, 9), (2, 1), (\pi, \text{ superman})\}
$$
Now, if $(x, y) \in R$, then we know, $x$ is related to $y$ by $R$. Here, $1$ is not related to $3$ by $R$ because $(1, 3) \notin R$. But, $\pi$ is related to $\text{superman}$ by $R$ because $(\pi, \text{ superman}) \in R$.
So, we can represent a relation such as, "$\text{is less than}$" as a set of ordered pairs, and if we can do that, it means sets of ordered pairs can be thought of as a relation itself. Thus, we can define a set of ordered pairs whose elements can be practically unrelated, but yet we can say that they are related. Is my understanding correct? How can we represent a relation itself, such as "$\text{is less than}$" as a set of ordered pairs?
Please take your time answering this question.
 A: One pair of relevant terms is intensionality vs. extensionality - think of these as "intended meaning" ("idea" in the language of your post) vs. "what the thing happens to be." E.g. in the real numbers, the notions "$x$ is less than $y$" and "there is some nonzero $z$ such that $x+z^2=y$" happen to coincide, but their intensions are different (note that the same ideas make sense in $\mathbb{C}$ more broadly but do not coincide there).
This can be a bit vague, but one way to make it precise is via model theory: we have on the one hand formulas and on the other hand definable relations corresponding to those formulas. In a given context, different formulas may happen to yield the same corresponding relations, and this reflects the intensionality/extensionality difference. I've written a bit about definability in model theory here.
Now at first it may feel like formulas, rather than the relations that they happen to describe in a given structure, are the more natural objects of study. There's certainly something to this; however, as logic developed it turned out that this isn't entirely correct. We can learn a lot by studying the "extensional" side of things. Moreover, the extensional point of view lets us think about relations which are not necessarily definable, and this gives us a whole different direction of inquiry. For example, this lets us distinguish the questions "Is there a bijection between $X$ and $Y$?" and "Is there a definable (in some appropriate sense) bijection between $X$ and $Y$?" A lot of interesting results in set theory emerge from this sort of distinction, and this is made easier to think about by taking an extensional perspective at least to some degree.
This will all become clearer as you progress through logic; for now, just keep an open mind with respect to the idea that both intensionality and extensionality are important perspectives. Note that this is already built in, to a small extent, in the axioms of set theory themselves: the aptly-named axiom of extensionality tells us exactly that we don't distinguish between objects which happen to have the same elements, even if their "ideas" are different. This is indeed nontrivial - set theories without extensionality make sense and have been studied.

As a quick coda, note that in set theory we can sometimes go further: certain definable relations coincide with objects (= sets of ordered pairs)! This happens whenever the definable relation is "small" (think set vs. class). So for example the formula "$x\not=x$" never holds, so in a model $M$ of set theory the definable set corresponding to it is $\emptyset$, and in that model of set theory there is also an object which is the empty set in the sense of that model. Basically, we're identifying $a\in M$ with $\{b\in M: b\in^M a\}$, where "$\in^M$" is $M$'s version of the elementhood relation. But this is a very subtle point and not something you should focus on at first.
A: 
If the idea — $x$ is less than $y$ — is the relation, then why is $R$ defined as the relation? I believe $R$ is the set-representation of the "is less than" relation. But I can't see how it is representing that relation.

There are actually two kinds of "relations" in formal theories based on first-order logic. The first kind is more accurately described as predicates over the language. This includes any relation-symbols, which are basically predicate-symbols (but usually $2$-input and infix). For example, PA− (the axioms for basic arithmetic) has the infix relation-symbol $<$ in its language. Over PA−, one can define other such predicates such as $d \mid k ≡ ∃x\ ( d·x = k )$. Arguably, we can call this "defining a new relation", and this is why such predicates are also called "definable relations".
But the key point to note is that such definable relations are not objects of the theory itself; you cannot quantify over them nor can you treat them as objects (e.g. instantiate some universal statement on them). That does not mean that a definable relation cannot be represented by some object. But it is impossible for every definable property (i.e. $1$-input predicates) to be represented, not to say every definable relations in general.
To be precise, to be able to (uniformly) represent every definable property by some object, we must have a (single) definable binary relation $◁$ such that $∃s\ ∀x\ ( \ x ◁ s ⇔ Q(x) \ )$ for every definable property $Q$. But this is impossible, otherwise $∃s\ ∀x\ ( \ x ◁ s ⇔ ¬( x ◁ x ) \ )$, from which we get a contradiction. You should recognize this as Russell's paradox, which effectively shows that not every definable relation can be represented by an object (at least for classical logic).
Specific to ZFC set theory, another example of a definable relation that is not representable by an object is "$∈$" itself.
The second kind of "relations" are foundational representations of (some) relations. The set of pairs of objects satisfying some relation is not the notion itself (as you thought), but is merely a convenient way of representing the notion in a set-theoretic foundation for mathematics. In a different foundational system, you might use a different definition of "relation". For instance, in a function-based foundational system you might define a "relation" between types $S,T$ to be a function from $S×T→\text{Bool}$.

But when $(x,y)∈R$, we don't say, $x$ is related to $y$ by the "is less than" relation, instead we say, $x$ is related to $y$ by $R$. Why can we do that?

So the answer is simply that in a set-theoretic foundation, when we define a relation that can be represented by the set $R$, then the expression "$(x,y)∈R$" literally means "$x$ is related to $y$ by the relation represented by $R$". Sure, if you want to be extremely pedantic then you may not want to say "$x$ is related to $y$ by $R$" just because $R$ is a set and not the relation itself. But there is nothing wrong with defining the phrase "$x$ is related to $y$ by $R$" to mean what you want it to mean, so there is no real issue.
