sometime my printer works and sometime it doesnt work. what should i do now...

Solution
Uninstall your printer.

Then re-install the printer software & driver as though you were installing it for the first time, as per the installation instructions in the printer setup guide.