Your printer might appear offline if it can't communicate with your PC. Here are some things to try to get your printer back online.
Check to make sure the printer is turned on and connected to the same Wi-Fi network as your PC. Your printer's built-in menu should show which network it's connected to, or check your printer's manual for more info.
Verify that your printer is not in Use Printer Offline mode. Select Start > Settings > Devices > Printers & scanners. Then select your printer > Open queue. Under Printer, make sure Use Printer Offline is not selected.
If these steps don't put your printer back online, then read Troubleshooting offline printer problems.