The Floyd-Warshall algorithm starts with a matrix of distances between vertices, where direct edges have their weights and no edges are marked as infinity. It uses three nested loops: the outer loop picks each vertex as an intermediate point, and the inner loops check all pairs of source and destination vertices. For each pair, it checks if going through the intermediate vertex offers a shorter path. If yes, it updates the distance. This process repeats for all vertices, gradually improving the shortest path estimates. The final matrix after all iterations contains the shortest distances between every pair of vertices. This method works even with negative edge weights but assumes no negative cycles exist. The execution table shows step-by-step updates, and the variable tracker follows key distance values as they change. Key moments clarify why the update condition is checked, why three loops are needed, and the role of infinity in representing unreachable paths.