Retreatment is typically a 'non-surgical' procedure, while an apicoectomy requires an incision
to expose the tip of the root so it can be sectioned and removed.
Both can be highly successful under the right circumstances. I usually opt for retreatment first, as it is able to clean the canal space. If retreatment is unsuccessful but done well, the apico has a much better chance of success after.