it is weak against wind, strong against earth, and is compatible with water making it stronger. it is also part of a combined elemental release of the storm release.
Okay, as we go, I'll need you to go into more detail.
Lightning can be used alongside Water so that the water is electrified, making it more dangerous. It can also be used with weapons to give them a greater cutting power and sometimes it can be used to paralyse an opponent (depending on the jutsu used)
It's weak to wind because wind is a natural insulator and it can easily deteriorate the lightning, it's strong against Earth because it has the power to pierce through Earth or make it crumble away.
Since you're knew, I'll assume you don't know how the rankings work so here:
A-rank Lightning = S-rank Earth.
A-rank Lightning > A-rank Earth and it'd continue towards the opponent at a weakened rank of B.
So for an Earth jutsu to cancel out a Lightning jutsu, it must be one rank higher.
As for weakness:
A-rank Wind = S-rank Lightning.
A-rank Wind > A-rank Lightning.
Lightning is not strong nor weak against Water and Fire, and so, using lightning wouldn't be a valid way of defending against a Fire or water jutsu, since it'd go straight through it. (and the water would get electrocuted, doing you more damage)
Of course, this doesn't mean Lightning can't be used in a combination with both Fire and Water.
Can you tell me why it'd be useful to use Lightning along side Fire? Or how it'd be used alongside fire?