DES: Computing the output of S-Box 1? If the 48-bit input to the S-box is 0xAAAAAAAAAAAA, what are the first four bits emitted by S-box 1?

Answer: 0110

I know that an S-Box takes n inputs and give m outputs and that n != m, but I really don't see how they got that answer.

Since a S-Box takes 3 bits and maps it to 2 bits how can you predict what AAA will be?
DES has a total of 8 s-boxes which takes 6-bit input (say $b_1b_2 ... b_6$) and produces 4-bit output. The s-boxes are the 2-dimensional array of size 4x16.
The bits $b_1b_6$ determine the row of the s-box and bits $b_2b_3b_4b_5$ determine the column. The value of 6-bit input is substituted with the value at cell $S_i[b_1b_6][b_2b_3b_4b_5]$.

In your given question the output of 1st s-box will be the value of $S_1[3][15]$

For reference, you can Cryptography: Theory and Practice, Third Edition (Discrete Mathematics and Its Applications) page 97.