A greedy algorithm is an algorithm that generates a solution to an optimisation problem by selecting the ‘best’ available choice from a set of decision options in each step.
A very well-known greedy algorithm is the nearest neighbour algorithm for solving tour planning problems: You build the tours by starting at the depot and visiting the nearest location/customer in each step that has not yet been visited and whose addition to the tour is permitted. If no further locations can be added, you return to the depot, complete the current tour and start a new tour. The algorithm ends when all locations/customers have been added to tours.
Unfortunately, greedy algorithms usually deliver very poor results because in the end only very unfavourable decision options are available. One exception is the determination of a minimum spanning tree in a graph. In this special case, the greedy algorithm (so-called ‘Kruskal's algorithm’) actually finds a guaranteed optimal solution.