A popular definition of an ordered pair (a,b) is the Kuratowski pair:
(a,b) = { { a }, { a, b } }
(42,15) = { { 42 }, { 42, 15 } }
Klick on one of the natural numbers to see how it is usually defined as a set.
This definition ensures the important properties of the pair, namely that the first and second element can be extracted and that (a,b) = (c,d) if and only if (a=c) and (b=d).
The ordered pair is used to define relations and functions: A relation is simply a set of ordered pairs - the relation holds between a and b if and only if (a,b) is in the set. A function is a relation where b1=b2 for all (a,b1) and (a,b2) in the relation (it has not more than one value b for a given a).