Same thing in slightly different words: A is "sufficient" for B if knowing "A is true" tells you that "B is true"; that is, "if A is true then B is true".
"If it is raining then I will carry an umbrella".
If you look out the window, you will know I am carrying an umbrella. Knowing "it is raining" is sufficient to tell you "I am carrying an umbrella".
On the other hand, I might be carrying an umbrella because I thought it might rain but it happens that it didn't. Seeing me carrying an umbrella does NOT tell you it is raining. Raining is not necessary to carrying an umbrella.
A is "necessary" for B if the only way B can be true is that A is also true.
On the other hand, If "I carry an umbrella only if it is raining", then seeing me with an umbrella tells you it must be raining.
Of course, if, when I leave the house, it is not already raining, then according to "I carry an umbrella only if it is raining", I cannot carry an umbrella. It might then start raining later, catching me "umbrellaless". That is, "I carry an umbrella only when it is raining" can be true even if it is raining and I do not have an umbrella. The fact that it is raining is not "sufficient" to tell you I am carrying an umbrella. It is, instead, necessary that it be raining in order to make me carry an umbrella.
Notice that, in this second case, seeing me with an umbrella is sufficient to tell you that it is raining. In the first case, "if it is raining then I am carrying an umbrella", the fact that I am carrying an umbrella is necessary before you can no it is raining.
"If A then B" means that knowing A is true is sufficient to knowing B is true and that B being true is necessary to A being true.
"B only if A" is the opposite: it is equivalent to "if B then A".
Of course "A if and only if B" works both ways- A being true is both sufficient and necessary to B being true and B being true is both sufficient and necessary to A being true.