An emergency fund is an easily accessible amount of money that should be tapped for emergencies only. It is up to the individual to determine what kinds of expenses qualify as emergencies. Most people calculate an appropriate emergency fund size based on a certain number of months of expenses (generally three to twelve), which implies that it is for use in the case of unexpected income loss. Other people may use their emergency funds to pay deductibles on their auto, homeowner/renter’s, or health insurance or to make car or home repairs. Whatever the need ends up being, emergency funds are there to keep you from going into debt when something unexpected occurs.
The most widely agreed-upon place to stash an emergency fund is in a savings account. The argument against investing the money in a more volatile asset is that you don’t want to get hit when you’re down by having an emergency occur just when the market has taken a downturn. You would have to realize your losses and at the same time have less money available for your emergency. Some people keep their emergency funds at the same bank as their check or even as a large buffer in their checking accounts, but if you have any issues with dipping into the emergency fund inappropriately you should keep it at another institution so the money feels less accessible.
Further reading: Why You Need an Emergency Fund First