I need to install new wifi thermostat but I don't have the C wire. There are G, W, Y and R wires attached to my old thermostat. There is also one blue wire not connected on the wall.
You'll have to connect the blue wire in the thermostat cable at both ends.
Start by connecting the blue wire in the thermostat cable to the
Comm terminal in the furnace.
Then connect the blue wire in the thermostat cable to the
C terminal on the thermostat.
The blue one attached to the terminal labelled "Comm" in your first picture is your C wire (C stands for "common").
So in your last picture, just screw that blue wire into the C terminal and you're good to go.
On another note, also make sure that you followed the wiring instructions included with your new thermostat - don't just match up the colors assuming it will work. And double check that you wired it correctly according to the instructions for your HVAC system type (heat pump, furnace, etc), and set it up accordingly in the software as well.