Magnetic 2D materials and heterostructures