What is the difference between published and unpublished waypoints?
Published waypoints are waypoints that appear on the charts and in the published navigation databases used by GPS navigators or FMSes.  They are referenced using the published identifier for the waypoint. Examples: TPA, ITAWT.  

Unpublished waypoints are waypoints created by the pilot.  FMS allow for the creation/entry of a waypoint by the pilot.  The waypoint is defined by one of the following:  


Latitude/Longitude
Place/Bearing/Distance
Place-Bearing/Place-Bearing


The pilot-defined waypoint can then be added to the flight plan.  

Here's a snip of how a waypoint is defined in an A320:  

  

As to when you would use it, the short answer is when you need to or want to.  A common example would be to deviate a short distance off an airway (maybe 5 or 10 nm) to avoid a temporary flight restriction.  You would just want to avoid the restricted airspace and using a published waypoint or waypoints would take you farther off your route than necessary.