Although it is not uncommon to see these two terms used interchangeably, it is important to note that technically there is a big difference between them. This is important to consider since, in some cases (depending on where you live), different laws and regulations might apply to each one.
First of all, a stun gun is designed to deliver a very painful electric shock upon direct contact causing an attacker to move away from it. Tasers are a brand and actually shoot two probes or darts at the attacker. These darts are connected to the device through wires and the electric shock sent through the wires immobilizes the attacker.
The basic difference between the two is the distance needed between you and a possible attacker. Both offer great advantages for your personal defense depending on what your preferences are.