TITLE: What does functor definition in category theory mean?
QUESTION [12 upvotes]: According to Wikipedia:

Let C and D be categories. A functor F from C to D is a mapping that

associates to each object $X$ in C an object $F(X)$ in D,
associates to each morphism $f : X  \rightarrow Y$ in C a morphism $F(f) : F(X) \rightarrow F(Y)$ in D such that the following two conditions hold:
  
  
$F(id_X) = id_{F(X)}$ for every object $X$ in C
$F(g \circ f)$ = $F(g) \circ F(f)$ for all morphisms $f : X  \rightarrow Y$ and $g : Y  \rightarrow Z$ in C.


That is, functors must preserve identity morphisms and composition of morphisms.

Maybe this is because of my programming background, but it's not clear what is $F$ in this definition. It looks like a function, but it always takes different arguments: $F(X)$ – object, $F(f)$ – morphism.
It looks like a very smart function that accepts all kinds of arguments and knows what to return in each case.
Moreover, in this book there is one more equation that makes thing even more complicated:
$$F(f : X \rightarrow Y) = F(f) : F(X) \rightarrow F(Y)$$
Does it mean that if we pass a function $f : X \rightarrow Y$ to $F$, we will get a function $F(f) : F(X) \rightarrow F(Y)$?
Also, shall $F$ mentioned here: $F(f : X \rightarrow Y)$
and here:
$F(X)$
to be two different functions with different signatures and behavior?

REPLY [4 votes]: If you extract the set1 $Ob(C)$ of objects from the category $C$ and the set $Ar(C)$ of arrows, then given any functor $F : C \to D$, you can indeed construct two functions 
$$ Ob(C) \to Ob(D) : X \mapsto F(X) $$
$$ Ar(C) \to Ar(D) : f \mapsto F(f) $$
satisfying the stated properties. And conversely, given any two functions satisfying the properties, there exists a corresponding functor.
You can think of the functor as being a pair of functions, but it is probably better to instead think of that as a way to represent functors. You want to think of a functor as being a thing in its own right, rather than being shackled to that particular representation.
For example, you can do the usual thing of promoting evaluation to a binary operator. In set theory, there is a set $Y^X$ of all functions from $X$ to $Y$, and you can consider evaluation a function $Y^X \times X \to Y$.
You can do the same thing with functors; there is a category $D^C$ whose objects are functors from $C$ to $D$ (and whose arrows are natural transformations), and evaluation is itself a functor $D^C \times C \to D$.
Another potentially interesting point is that categories don't just have point-shaped and arrow-shaped elements. They have elements in the shape of any diagram: for example, they have commutative-square-shaped elements, and the functor $F$ also maps commutative-square-shaped elements of $C$ to commutative-square-shaped elements of $D$.
That a functor preserves composition of morphisms can actually be phrased in terms of the functor acting on the commutative-triangle-shaped elements.
(all of the information of a category is in its arrows so we can reduce all various-shaped elements to arrows and equations between them, but we don't have to)
1: Replace "set" with other notions as needed or to taste