Pressure effects on magnetism and superconductivity