You didn't mention if you're asking about a specific country or jurisdiction (although your question seems to be based on European information), but here's some information about the US situation.
A published waypoint is simply what it sounds like: it's a waypoint that's published on a chart, approach procedure etc. and has a name. This question has more information.
An unpublished waypoint is one that doesn't exist on any public chart. They're used by ATC or pilots. For the ATC side you can read more in the ATC Orders 4-1-5, but essentially an unpublished fix is simply any uncharted point that ATC uses to direct aircraft, such as an ad hoc holding point, a reporting point or something else:
An unpublished fix is defined as one approved and planned for
publication which is not yet depicted on the charts or one which is
used in accord with the following: [...]
It then goes on to essentially say that ATC can define their own fixes as needed for operational reasons. This (fictional) instruction is using an unpublished fix:
N12345, hold east of the Hinch VOR on radial 080 at 10 DME
Note that the orders imply a preference for published fixes:
Unpublished fixes should not negate the normal use of published
intersections. Frequent routine use of an unpublished fix would
justify establishing a fix.
From the pilot's side, a pilot can define his own waypoints for a single flight or as a 'permanent' waypoint in the GPS or FMS. Gerry's answer has a nice example from the A320 FMS but for private pilots, tools like ForeFlight or Garmin Pilot allow you to create and save your own waypoints. That can be useful for a single flight if you want to route around weather, a TFR or whatever. Or if you frequently fly the same route, or use the same private (uncharted) airstrips then creating your own personal waypoints can be very convenient.