The goal of this work is to study the evolution of high redshift ( z \geq 1.4 ) quiescent galaxies over an effective area of \sim 1.7 deg ^ { 2 } in the COSMOS field . Galaxies have been divided according to their star-formation activity and the evolution of the different populations , in particular of the quiescent galaxies , has been investigated in detail . We have studied an IRAC ( mag _ { 3.6 \mu m } < 22.0 ) selected sample of \sim 18000 galaxies at z \geq 1.4 in the COSMOS field with multi-wavelength coverage extending from the U band to the Spitzer 24 \mu m one . We have derived accurate photometric redshifts ( \sigma _ { \Delta z / ( 1 + z _ { s } ) } = 0.06 ) through a SED-fitting procedure . Other important physical parameters ( masses , ages and star formation rates ( SFR ) ) of the galaxies have been obtained using Maraston ( 2005 ) models . We have divided our sample into actively star-forming , intermediate and quiescent galaxies depending on their specific star formation rate ( SSFR = SFR / M ) . We have computed the galaxy stellar mass function ( GSMF ) of the total sample and the different populations at z = 1.4 - 3.0 . We have studied the properties of high redshift quiescent galaxies finding that they are old ( 1 - 4 Gyr ) , massive ( \langle M \rangle \sim 10 ^ { 10.65 } M _ { \odot } ) , weakly star forming stellar populations with low dust extinction ( E ( B-V ) \leq 0.15 ) and small e-folding time scales ( \tau \sim 0.1 - 0.3 Gyr ) . We observe a significant evolution of the quiescent stellar mass function from 2.5 < z < 3.0 to 1.4 < z < 1.6 , increasing by \sim 1 dex in this redshift interval . We find that z \sim 1.5 is an epoch of transition of the GSMF : while the GSMF at z \gtrsim 1.5 is dominated by the star-forming galaxies at all stellar masses , at z \lesssim 1.5 the contribution to the total GSMF of the quiescent galaxies is significant and becomes higher than that of the star-forming population for M \geqslant 10 ^ { 10.75 } M _ { \odot } . The fraction of star-forming galaxies decreases from 60 \% to 20 \% from z \sim 2.5 - 3.0 to z \sim 1.4 - 1.6 for M \sim 10 ^ { 11.0 } M _ { \odot } , while the quiescent population increases from 10 \% to 50 \% at the same redshift and mass intervals . We compare the fraction of quiescent galaxies derived with that predicted by theoretical models and find that the Kitzbichler \& White ( 2007 ) model , implemented on the Millennium Simulation , is the one that better reproduces the shape of the data . Finally , we calculate the stellar mass density of the star-forming and quiescent populations as a function of redshift and find that there is already a significant number of quiescent galaxies at z > 2.5 ( \rho \sim 6.0 M _ { \odot } Mpc ^ { -3 } ) , meaning that efficient star formation had to take place before that time .