An emergency fund is very handy when unplanned and unexpected expenses arise. It is always advisable to have some money tucked away for a rainy day, as an emergency fund can supplement any temporarily foregone income or can be used for an infrequent/unexpected purchase. Usually, financial experts advise that an emergency fund should be able to cover three to six months of living expenses. Emergency funds should not be invested in risky places like the stock market, and should instead be focused on high quality liquid fixed income securities or money market investments. The purpose of an emergency fund is to have money in case of an unplanned event such as a layoff or unforeseen medical expenses. The volatility of the stock market makes it a very risky option and also makes it impossible to guarantee that you will have sufficient funds if there is an emergency.
Emergency funds serve as a safety net where one can afford to pay for living necessities that cannot be obtained through current income sources. It is advisable to place emergency funds in a fairly liquid interest earning investment option. In other words, in the case of an emergency, you should be able to access the fund quickly and inexpensively. This means that you want to pick investment options that do not charge high fees or have inexpensive "early withdrawal" fees. This rules out long-term investment options (because of the time period) or mutual funds (because of the fees and risk involved). The most popular options for emergency funds are savings accounts and short-term certificates of deposit.
For tips on how to build an emergency fund please read Build Yourself An Emergency Fund.
This question was answered by Chizoba Morah.