How does an ac current flow in a wire when it is reversing every half a cycle?

Because it reaches the end of the line every half cycle! Electricity flows at approximately the speed of light.

This is incorrect. Electrons in the wire actually move at a very slow speed (about 0.0001 m/s, or 0.00022 mph), and this speed is called the drift velocity of the electrons. However, this is neither here nor there in regards to the question. Current is defined as the rate of flow of charge, or I = q / t, where I is the current, q is the net charge, and t is the net time. Each electron has a small charge, and in an AC current the each electron oscillates back and forth about a single point in the wire. Our definition of current as been fulfilled: we have charge flowing. It makes no difference that the electrons are simply moving back and forth; they are still moving. It's an interesting thing to note that the power company doesn't actually provide you with charge; all they do is the work required to move the charges already in your wires back and forth.