There are two common methods for carbene generation.  
In α elimination, two substituents eliminate from the same carbon atom.  This occurs with reagents with no good leaving groups vicinal to an acidic proton are exposed to strong base; for example, phenyllithium will abstract HX from a haloform (CHX).  Such reactions typically require phase-transfer conditions.  
Molecules with no acidic proton can also form carbenes.  A geminal dihalide exposed to organolithiums with undergo metal-halogen exchange and then eliminate a lithium salt to give a carbene, and zinc metal abstracts halogens similarly in the Simmons–Smith reaction.  
:RCBr  +  BuLi  →  RCLi(Br)  +  BuBr
:RCLi(Br)  →  RC  +  LiBr
It remains uncertain if these conditions form truly free carbenes or a metal-carbene complex.  Nevertheless, metallocarbenes so formed give the expected organic products. In a specialized but instructive case, α-halomercury compounds can be isolated and separately thermolyzed.  The "Seyferth reagent" releases CCl upon heating:
:CHHgCCl  →  CCl  +  CHHgCl
Separately, carbenes can be produced from an extrusion reaction with a large free energy change.  Diazirines and epoxides photolyze with a tremendous release in ring strain to carbenes.  The former extrude inert nitrogen gas, but epoxides typically give reactive carbonyl wastes, and asymmetric epoxides can potentially form two different carbenes.  Typically, the C-O bond with lesser fractional bond order (fewer double-bond resonance structures) breaks.  For example, when one substituent is alkyl and another aryl, the aryl-substituted carbon is usually released as a carbene fragment.  
Ring strain is not necessary for a strong thermodynamic driving force.  Photolysis, heat, or transition metal catalysts (typically rhodium and copper) decompose diazoalkanes to a carbene and gaseous nitrogen; this occurs in the Bamford-Stevens reaction and Wolff rearrangement.  As with the case of metallocarbenes, some reactions of diazoalkanes that formally proceed via carbenes may instead form a [[1,3-Dipolar cycloaddition|[3+2] cycloadduct]] intermediate that extrudes nitrogen.  To generate an alkylidene carbene a ketone can be exposed to trimethylsilyl diazomethane and then a strong base.