Both are measures of the gravity of the wort, specifically measuring the percentage of solids (sugars) dissolved into the wort. A gravity of 1.050 equals a wort with 5% sugars dissolved into solution (plain water has a gravity of 1.000, meaning it is 100% water). You use a hydrometer to figure out the exact gravity number.
Post-fermentation your beer will then have water plus alcohol (which has a gravity slightly less than water, or less than 1.000) plus some remaining unfermented sugars.
OG is original gravity, or gravity of the wort before fermentation .
FG is final gravity, or gravity of the fermented beer.
OG minus FG will roughly correspond to the amount of alcohol in the beer (not exactly, since alcohol's gravity is less than 1, but there are online calculators to figure it. The calculation is simple but I don't know it off the top of my head)
Basically, an OG of 1.050 and a FG of 1.010 will result in about 4% alcohol.