BOOLEAN FUNCTIONS: generate a function $f: \{0, 1\}^n \rightarrow \{0, 1\}$ from a $n \times n$ S-Box I want to calculate the hamming weight of a S-Box using this formula:
$\text{hw}(f) = \sum_{x=0}^{2^n-1} f(x)$.
Where $f: \{0, 1\}^n \rightarrow \{0, 1\}$

My problem is that I don't know how to get the $f$-function.

I found that helpful paper: THE DESIGN OF S-BOXES. At Page 9 (18) boolean functions are described. But she only prints the truth table (Table 2.1) without describing her $f$-function. She only says $f$
is a linear function, therefore I think $f$ depends on my S-Box?

For example, if I have this $2 \times 2$ S-Box:

0    1    2    3 
1    3    0    2 


$00 \rightarrow 01\\
01  \rightarrow 11\\
10  \rightarrow 00\\
11  \rightarrow 10$

What are the $f$-functions and what is the hamming weight?
Your n x n S-Box can be seen as a set of $ n $ boolean vectors of size $ n $. Actually you have got $ n $ functions, each one is the truth table of one particular vector (or column). 
In your example there are 2 columns thus 2 functions. For each column the number of 1's is 2.