To what extent are morphisms required to be functions? Just beginning category theory, and I am looking for clarification on the precise nature of morphisms. The most familiar categories, e.g. $\mathbf{Top}$, have morphisms that are functions in the traditional sense, i.e. subsets of $A \times B$ such that for $(a_1,b_1)$ and $(a_2,b_2)$, $b_1 \not= b_2 \implies a_1 \not= a_2$.
But considering a category such as $\mathbf{Rel}$ where the morphisms are only relations, this seems not to be constant. It would seem a priori that the minimal structure required to be a morphism is having a well defined source and target and notion of composition; how is this formalized?
Apologies for the somewhat vague nature of this question. What I am asking is can we regard a morphism as an ordered pair (domain and codomain) which may or may not have additional structure?
 A: Every partially ordered set (poset) is a category; $x\to y$ iff $x\le y$. The morphism here is the ordered pair $\langle x,y\rangle$, which is not a function: it’s not a set of ordered pairs. Composition in this case is just ‘cutting out the middleman’; that it’s available is a consequence of transitivity.
The definition of category imposes certain conditions on morphisms, but it doesn’t say anything about their internal structure. Anything that satisfies those conditions — here just certain ordered pairs — gives you a category.
A: ".... how how is this formalizes ?" 
Answer: It's formalized by the definition of category. In a category, the morphisms don't have to have any structure on their own. All that is required is that you know what the domain and codomain of each morphism are, and that you know how to compose morphisms (and, of course, that the category axioms are satisfied). 
A: Morphisms are part of the data of a category, so I'm not entirely sure what you're asking. What you need for a morphism in category is: source, target, and a composition that is associative. Moreover, every object has an identity morphism that behaves as one'd expect it to behave.
It is often important to know what the morphisms are, since the same class of objects may have different morphisms, hence giving a different category. Consider, for instance, categories with topological spaces as objects. If you take standard maps as morphism, you get the category you mentioned. You may, however, also take homotopy classes of maps to be the morphisms. What you get is the so-called homotopy category. And if you, for instance, look at based topological spaces, you can consider the base-point preserving maps as morphisms, but you get a different category if you let the germs of maps (around the base point) be the morphisms.
A: You are right Cameron, the only requirement for something to be a morphism is to have a domain and a codomanin.
In more detail, take the definition of category for ex. from Wikipedia:

There are many equivalent definitions of a category. One commonly used definition is as follows.
A category C consists of
a class ob(C) of objects
a class hom(C) of morphisms, or arrows, or maps, between the objects.
Each morphism f has a unique source object a and target object b where a and b are in ob(C). We write f: a → b, and we say "f is a morphism from a to b". We write hom(a, b) (or $hom_C(a, b)$ when there may be confusion about to which category hom(a, b) refers) to denote the hom-class of all morphisms from a to b. (Some authors write Mor(a, b) or simply C(a, b) instead.)
for every three objects a, b and c, a binary operation hom(a, b) × hom(b, c) → hom(a, c) called composition of morphisms; the composition of f : a → b and g : b → c is written as g ∘ f or gf. (Some authors use "diagrammatic order", writing f;g or fg.)
such that the following axioms hold:
(associativity) if f : a → b, g : b → c and h : c → d then h ∘ (g ∘ f) = (h ∘ g) ∘ f, and
(identity) for every object x, there exists a morphism 1x : x → x (some authors write idx) called the identity morphism for x, such that for every morphism f : a → b, we have 1b ∘ f = f = f ∘ 1a.

As you see there is nothing about the nature of the morphisms, in particular it does not say that they are functions and indeed in many noteworthy cases they are not functions.
The definition requires that each morphism have a domanin and a codomain. How is this obtained formally? Very simple (and some other sources make it explicit, eg Mac Lane ), you state that there are 2 functions - called dom and cod - that respectively associate to a morphism f its domain and codomain.
$$dom: hom(C)\to ob(C) $$
$$cod: hom(C)\to ob(C) $$
So dom(f) / cod(f) is the object which is the domain / codomain of f.
These are total functions, that means that they are defined on every morphism (every morphism has a domain and a codomain).
They are generally not injective functions (you may have 2 morphisms with the same domain and/or codomain).
They are surjective (given any object a, there is at least one morphism - called the identity morphism $Id_a$ - such that $dom (Id_a) =a$ and $cod (Id_a) =a$ ).
