There are two types of functors; covariant and contravariant. Is it right? In the category theory, there are lots of functors between the categories. I thought that however each functor must be either covariant or contravariant, for instance, the identity functor is covariant. But the following example made me confused;
Let $\mathfrak C$ be any category. Consider the functor that assigns to each pair $\left(A, B\right)$ of objects of $\mathfrak C$ the set hom$_\mathfrak C\left(A, B\right)$ and to each pair of motphisms $f : A\rightarrow A', g : B\rightarrow B'$ the function hom$\left(f, g\right) : $ hom$_\mathfrak C\left(A', B\right)\rightarrow$ hom $_\mathfrak C\left(A, B'\right)$ given by $h \mapsto ghf$. Then hom$_\mathfrak C \left(-, -\right)$ is a functor of two variables from $\mathfrak C$ to the category $\mathfrak S$ of sets, contravariant in the first variable and covariant in the second.
Is this functor either covariant or contravariant? or is it wrong?
 A: Look at Giorgio's answer. This is an addition for your example.
Your example is a bifunctor $\hom_{\mathcal{C}}\left(-,-\right):\mathcal{C}^{op}\times\mathcal{C}\rightarrow\mathbf{Set}$.
For every object $A$ you have the covariant functors $\hom_{\mathcal{C}}\left(A,-\right):\mathcal{C}\rightarrow\mathbf{Set}$
and $\hom_{\mathcal{C}}\left(-,A\right):\mathcal{C}^{op}\rightarrow\mathbf{Set}$.
You can also look at functor $\hom_{\mathcal{C}}\left(-,A\right):\mathcal{C}\rightarrow\mathbf{Set}$
as a contravariant functor.
A: Let's say that if you wish to take the distinction between co and contravariant functor then you have to accept that there are some functor (like the $\hom$-functors) that aren't either co or contravariant in absolute sense.
Anyway the truth is that there's no real distinction between co and contravariant functor, because every functor is just a covariant functor.
More in details a contravariant functor $\mathcal F$ from a category $\mathbf C$ to a category $\mathbf D$ is nothing more than a (covariant) functor of type $\mathcal F \colon \mathbf C^\text{op} \to \mathbf D$, from the opposite category of $\mathbf C$ to the category $\mathbf D$.
You can easily see that trying to unravel the classical definition of contravariant functor and that of a functor that goes from an opposite category of a given category. You'll see that the definitions are the same.
Edit: after the comment of the OP below I suppose is necessary to give some additional info.
Every functor (co or contravariant) has a unique source category and a  unique target category. In general the distinction between covariant and contravariant is primarily concerend in the fact that while the first one preserve the orientation of morphisms the other one reverse.
So to answer the question whether the $\hom$-functor is co/contravarint one has to identify its source category, if this source category is $\mathbf C \times \mathbf C$ (the product category) then the $\hom$-functor is neither co or contravariant because it preserves the direction of the morphism in one component but reverses it in the other component. 
Of course if you see $\hom$ as a functor from the category $\mathbf C^\text{op} \times \mathbf C$ then it become covariant, if you see it as a functor from $\mathbf C \times \mathbf C^\text{op}$ it's contravariant.
End Edit. 
Hope this helps.
