How is that A.C can travel miles and miles while D.C can't?
Since, from Ohm's law,
So, I think the resistance would be the factor in case of D.C but how does A.C overcomes it?
"How does A.C travels through wires?"
Almost exactly like DC, except that it goes back and forth.
"How is that A.C can travel miles and miles while D.C can't?"
Your assumption is wrong. For lines that are short compared to the AC wavelength both AC and DC are equally limited by Ohm's law and its consequences. For lines that are not short compared to the AC wavelength AC incures extra losses. Hence for trasnport ofver very long distances AC is sometimes converted to DC at the source, and converted back to AC at the destination. AC is (otherwise) preferred because it is far easier to convert to a different voltage using a transformer.
The reason why AC is primarily used for long distance transmission is due to the fact that it is very easy to increase the voltage of AC with a transformer. Transformers are very easy to build and design, and they are also very efficient. In order to transfer large quantities of power over large distances, the power is ideally high voltage and low current.
Here is the basic premise of high voltage transmission:
If you need to transfer 1 MW of power (MegaWatt) over a large distance, then your transmission lines will have some appreciable loss. Consider two options: using 500kV and 500V. If our line has a resistance of 0.1 \$\Omega\$, then we can calculate our transmission losses.
At 500V, 1MW would be roughly 2,000 Amps. Ohms law shows that the voltage drop across the transmission line is \$2,000A\times 0.1\Omega=200V \$. This means that 40% of our power is lost in the process of sending it, and our voltage at the other side is a lousy 300V.
At 500kV, our current is only 2 Amps. At this point, our voltage drop is only 0.2V, and our lost power is \$ I^2R=2^2\times 0.1\Omega=0.4\$ Watts.
Using a higher voltage makes the system significantly more efficient. High voltage AC lines are used throughout the world for power grids for this reason. High voltage DC is also used, but less frequently due to the additional cost of the sending and receiving stations. Nothing makes long distance DC power impossible, but long distance power needs to be high voltage.
Long distance lines use very high voltages.
This is for a several reasons:
voltage drop = resistance * current
Notice that none of things listed above require AC.
Back when electricity was first being used, they had to figure out some way of transmitting power over large distances. Which requires either very large wires, or very high voltages. The best/cheapest choice was high voltage.
They then had to figure out a way to convert those voltages down to a safer voltage. This is where AC shines. To convert high voltage AC to a lower voltage requires a very simple device, a transformer.
To reduce the voltage of DC, is quite a bit more difficult. There are only a few ways to do this. The most efficient is to convert it to AC in some way. Even switching power supplies have a PWM controlled alternating voltage. It is also a lot harder to convert high voltage DC than a lower voltage.
There are actually high voltage DC transmission lines. They are almost always used to isolate separate AC networks. Most of them are used to connect different frequencies of AC. Others are used to isolate networks which may be out of phase with each-other. They can also be used to simplify the connection of remote generators.
DC lines can carry more power ( actually power lines do not carry power at all it is carried in the space around the wire as electromagenitic fields ) because a major limit of lines is the peak voltage they can carry before break down. AC spends a lot of time "off peak" but DC is always at its peak. AC is/was used for the ease in voltage conversion.