  We use a complete sample of galaxies drawn from the SDSS to study how
structure, star formation and nuclear activity depend on local density and on
stellar mass. Local density is estimated by counting galaxies above a fixed
absolute magnitude limit within cylinders 2 Mpc in projected radius and +-500
km/s in depth. The stellar mass distribution of galaxies shifts by nearly a
factor of two towards higher masses between low and high density regions. At
fixed stellar mass, both star formation and nuclear activity depend strongly on
local density, while structural parameters such as size and concentration are
almost independent of it. The galaxy property most sensitive to environment is
specific star formation rate. For galaxies with stellar masses less than 3 x
10^10 M_sun, the median SFR/M* decreases by more than a factor of 10 from low
to high densities. This decrease is less marked for massive galaxies. At fixed
stellar mass, twice as many galaxies host AGN with strong [OIII] emission in
low density regions as in high. Massive galaxies in low-density environments
also contain more dust. We have analyzed correlations between spectroscopic
indicators that probe SFH on different timescales (D4000, Hdelta_A and SFR/M*).
The correlations do not depend on environment, suggesting that the decrease in
star formation has ocurred over long (>1 Gyr) timescales. Since structure does
not depend on environment for more massive galaxies, trends in recent SFH, dust
and AGN for these systems cannot be driven by processes that alter structure,
e.g. mergers. The SFH-density correlation is strongest for small scale (< 1
Mpc) estimates of local density. Finally, we highlight a striking similarity
between changes in the galaxy population as a function of density and as a
function of redshift and we interpret this using N-body simulations.
