What factors affect the chemical stability of a compound? [closed]

My question is essentially about the factors that make certain atoms in certain compounds leave the compound they are currently in in order to bond with another atom/compound.

For example, I've been taught that if you react a halo-alkane with a strong base, like KOH, a substitution occurs in which OH and the halogen change places. Why does this happen (if it does)?

Would an electronegative atom rather want to bond with another extremely electronegative atom, or one that has extremely little electronegativity? Basically, would fluorine want another fluorine, or rather something like caesium?

$$\ce{Cs + F \to CsF}$$ $$\ce{F + F \to F2}$$

My thought is that fluorine 'loves' electrons so much, and there is nothing else that loves electrons more than this guy, so this has to be the most stable compound ever that is not dissociable by any other compound/atom.

closed as too broad by M.A.R., Wildcat, Klaus-Dieter Warzecha, bon, ronAug 15 '16 at 18:04

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• There is a nice video about the reaction between cesium and fluorine: youtu.be/TLOFaWdPxB0 – SteffX Aug 14 '16 at 21:11