Understanding the third-placed table for Euro 2024

The top two from the group stage at Euro 2024 go through automatically but they will be joined by four best third-placed teams. How are these decided, and who could they face in the knockout stage?

Understanding the third-placed table for Euro 2024
The top two from the group stage at Euro 2024 go through automatically but they will be joined by four best third-placed teams. How are these decided, and who could they face in the knockout stage?