I always get confused with these things. I read it, understand it and then forget it. So that's why I wrote it down.
p -> q
This means if p then q. Two views on this implication:
1. Here p is the sufficient condition, in the sense that it is sufficient to conclude that q happened if we are sure that p happened. This also means, that there are other ways of making q happen and one of them is p.
2. Here q is the neccessary condition, in the sense that q is necessary condition for p to happen. But p may either choose to happen or not choose to happen and hence q is not sufficient condition for p.
Eg: Amit will eat the fruit -> fruit is an apple
1. To conclude that the fruit is an apple, it is sufficient to find if Amit ate the fruit. So Amit will eat the fruit is sufficient condition for fruit to be an apple. Note that it is not the necessary condition as fruit could be apple but Amit did not eat it.
2. Here fruit being apple is necessary condition for Amit to eat the fruit since it means Amit will only eat apples. Note that, Amit will only eat apples and the given fruit being apple is not sufficient as Amit might choose not eating all the apples given to him.
In short, for q to happen, it is sufficient that p happens (and there could be other ways of making q happen). And, for p to happen, it is necessary that q happens (this is the only condition to make p happen and nothing else).
p <-> q
Here q is both necessary and sufficient condition for p. Consider:
Eg: Amit will eat fruit <-> fruit is an apple
It means that Amit will eat all and only those fruits that are apples. He will not leave any apple uneaten and he will not eat any other fruit. Hence, given fruit is apple is both a necessary and sufficient condition for Amit to eat the fruit.->->
P.S. p -> q means (a) if p then q or (b) q if p or (c) p only if q.
P.P.S. The 'if' in the above statements can be replaced by 'when' or 'whenever'.
Source: wikipedia.org