The ALICE experiment has measured quarkonia production in pp and Pb-Pb collisions at the CERN LHC, in the rapidity ranges |y|<0.9 and 2.5<y<4. Quarkonia are considered to be a sensitive probe of deconfinement, and a detailed differential study of their yields can give important information on the properties of the medium created in heavy-ion collisions. In this paper, we will mainly discuss the centrality dependence of the J/psi nuclear modification factors, as well as their p_T and y dependence in bins of centrality, which will be then compared to theoretical models. Preliminary results on the J/psi elliptic flow and on psi(2S) production will also be shown.