N-, P-, and S-alkylation are important processes for the formation of carbon-nitrogen, carbon-phosphorus, and carbon-sulfur bonds, 
Amines are readily alkylated.  The rate of alkylation follows the order tertiary amine < secondary amine < primary amine.  Typical alkylating agents are alkyl halides. Industry often relies on green chemistry methods involving alkylation of amines with alcohols, the byproduct being water. Hydroamination is another green method for N-alkylation.
In the Menshutkin reaction, a tertiary amine is converted into a quaternary ammonium salt by reaction with an alkyl halide. Similar reactions occur when tertiary phosphines are treated with alkyl halides, the products being phosphonium salts.
Thiols are readily alkylated to give thioethers via the thiol-ene reaction. The reaction is typically conducted in the presence of a base or using the conjugate base of the thiol. Thioethers undergo alkylation to give sulfonium ions.