Single quote is used in C and derived languages to introduce a single character literal value which is represented internally by its ASCII code. In the Unix shells and Perl single quote is used to delimit strings in which variable substitution is not performed (in contrast to double-quote-delimited strings).
Single quote is often used in text for both open and close single quotation mark and apostrophe. Typesetters use two different symbols - open has a tail going up, close and apostrophe have tails hanging down (like a raised comma). Some people use back quote (`) for open single quotation mark.