We study the effects of local environment and stellar mass on galaxy properties using a mass complete sample of quiescent and star-forming systems in the COSMOS field at z \lesssim 3 . We show that at z \lesssim 1 , the median star-formation rate ( SFR ) and specific SFR ( sSFR ) of all galaxies depend on environment , but they become independent of environment at z \gtrsim 1 . However , we find that only for star-forming galaxies , the median SFR and sSFR are similar in different environments , regardless of redshift and stellar mass . We find that the quiescent fraction depends on environment at z \lesssim 1 , and on stellar mass out to z \sim 3 . We show that at z \lesssim 1 , galaxies become quiescent faster in denser environments and that the overall environmental quenching efficiency increases with cosmic time . Environmental and mass quenching processes depend on each other . At z \lesssim 1 , denser environments more efficiently quench galaxies with higher masses ( log ( M / M _ { \odot } ) \gtrsim 10.7 ) , possibly due to a higher merger rate of massive galaxies in denser environments , and that mass quenching is more efficient in denser regions . We show that the overall mass quenching efficiency ( \epsilon _ { mass } ) for more massive galaxies ( log ( M / M _ { \odot } ) \gtrsim 10.2 ) rises with cosmic time until z \sim 1 and flattens out since then . However , for less massive galaxies , the rise in \epsilon _ { mass } continues to the present time . Our results suggest that environmental quenching is only relevant at z \lesssim 1 , likely a fast process , whereas mass quenching is the dominant mechanism at z \gtrsim 1 , with a possible stellar feedback physics .