Exploring dense and cold QCD in magnetic fields