LaserJet 1018 is not properly supported on Mac out of the box. There is a way to make it work however
Make sure it's turned on and plug it into your Mac. Open printing preferences. Add new printer - HP LaserJet 1018. It will ask you to select driver: search for HP LaserJet 1015 and add this printer. Now this will not work, yet.
Open System Update and search for updates. It will find update for HP printing software, install it.
Open printing preferences again. Delete the printer you just added. Now add it again. This time tell it to use printer driver HP LaserJet 1022