We study the effects of environment on the evolution of galaxies, with an emphasis on two different approaches towards the definition of environment: (1) environment defined based on the local surface density of galaxies and (2) environment defined based on the major components of the cosmic web; i.e., filaments, clusters and the field. In the first approach, surface density field is estimated using a variety of estimators and tested with simulations. Using the estimated surface densities assigned to galaxies, we observe a strong environmental dependence on the properties of galaxies (e.g., SFR, sSFR and the quiescent fraction) at $z\lesssim$1. We explore the fractional role of stellar mass and environment in quenching the star-formation. In the second approach, we use the Multi-scale Morphology Filter algorithm to disentangle the density field into its component. We apply this method to a sample of star-forming galaxies for a large-scale structure at $z\sim$0.84 in the HiZELS-COSMOS field. We show that the observed median SFR, stellar mass, sSFR, the mean SFR$-$mass relation and its scatter for star-forming galaxies do not strongly depend on the cosmic web. However, the fraction of H$\alpha$ star-forming galaxies varies with environment and is enhanced in filaments. Furthermore, we study the physical properties of a spectroscopic sample of star-forming galaxies in a large filament in the COSMOS field at $z\sim$0.53, with spectroscopic data taken with the Keck/DEIMOS spectrograph, and compare them with a control sample of field galaxies. We spectroscopically confirm the presence of a large galaxy filament ($\sim$ 8 Mpc). We show that within the uncertainties, the ionization parameter, EW, EW versus sSFR relation, EW versus stellar mass relation, line-of-sight velocity dispersion, dynamical mass, and stellar-to-dynamical mass ratio are similar for filament and field star-forming galaxies. However, we show that on average, filament star-forming galaxies are more metal-enriched ($\sim$ 0.1$-$0.15 dex) and the electron densities are significantly lower (a factor of $\sim$17) in filament star-forming systems compared to those in the field. Our results highlight the potential role of galaxy filaments and intermediate-density environments on the evolution of galaxies, which has been poorly investigated.