Magnets can't be printed while they're magnetic. There are two ways of printing the materials that will later become magnetic.
The magnetic materials are printed first, then magnetized after printing.
A strong adhesive sheet is printed then applied to a magnetic sheet then cut to size.
The first option is generally more expensive in smaller batches, while the latter method is typically thinner in final form than a base magnetic sheeting.