How can a group be both a good nucleophile and a good leaving group? I'm reading about $\:\mathrm{S_N1}$ and $\:\mathrm{S_N2}$ reaction mechanisms, and I have a few questions.

My book has a couple of tables, one lists a bunch of substances grouped as good, moderate and poor nucleophiles. Among the good are $\ce{Br-}$ and $\ce{I-}$. So a couple of halogens. I'm figuring chlorine is in that group too.

Then it has a table showing ability to function as leaving group. Iodine, bromine and chlorine anions are at the top of that list too.

My question is: How can these be quite attracted to the positive charge AND quite easy to remove at the same time?
I'm not entirely sure of this, comments appreciated

Leaving group tendency is a thermodynamic variable. So, it depends more on the equilibrium and energies of the reaction. We calculate it from the basicity of the group (weak base -> more stable while solvated -> better leaving group).

Now, iodide is a weaker base than $\ce{OH-}$, since its conjugate acid $\ce{HI}$ is a stronger acid than $\ce{H2O}$. So, iodine is a better leaving group.

On the other hand, nucleophilic tendency is basically "how willing to sacrifice a lone pair is the group?".  It's more dependent on forces, and less on energy, as it is a kinetic phenomenon. The outer shell electrons in $\ce{I-}$ are more loosely bonded to it than those in oxygen in $\ce{OH-}$. So, it is a better nucleophile.

Another way to look at it would be via the "accessibility" of the group in solution. This basically attempts to explain the difference between a nucleophile and a leaving group. In a leaving group, you have to "give up" the ion to the solution. This means that solvation doesn't really matter here -- once you've given it up, it's gone. The process will have a similar rate for different ions. However, when looking at the reverse process, you need to check how solvated the ion is. If the ion is surrounded by water molecules (like $\ce{F-}$, it will be much harder for the electrophile to "extract" it. On the other hand, an ion like $\ce{I-}$ is less solvated, and thus more "accessible".