- 生 Short for 先生 in Cantonese
- 先生 is gender neutral in Chinese, however most people use it as the Chinese version of "Mr."
Profession that is associated with 先生 is teachers (still used very often in the 80s and 90s. But thanks to the Communists such elegant term is abolished and people have started to call teachers as 老師 even in Cantonese). So if your Chinese teacher was a lady, you could still call her X生.
As a side note, anyone who is well respected in any profession can be called 先生. Again, this is rarely the case in Cantonese speaking regions in the last 10 to 20 years.
- 生 is only used in Cantonese, though 先生 is not. However, 先生 is often replaced, erroneously, by 老師 in China. Often times, you hear someone being called 老師 even though he does not teach.
- Calling someone x生 is often used formally.
When I was taught Chinese in the 90s, students were told to address someone in 先生 if we couldn't figure out the gender by the name. Some people might get offended by this nowadays. A sign of deterioration of Chinese skills.
Updated 7/22/2015
To address a follow up question:
The other answer says it's not used when it is written However, x生 is used formally in conversations. For example, employees address their CEO as x生. Some insist that x生 can be written. Widely accepted in e-mail and text messages when addressing your client, actually, if the other person is in Hong Kong or a Cantonese speaking person as well. How many of these rules for letter writing in grammar school 30 years still apply today in e-mails?