You build it by putting money away for it. If you use a savings account for it, you just aggressively put money into it until it meets your requirement.
How much depends on a variety of factors, but it is best to get at least $1000, and then work up to 3 months expenses, and then see what you need from there. Obviously, the larger the emergency fund, the more one is prepared, but sometimes, one can analyze the risk and make a decision that it only realistically needs to cover a few months at most.
It doesn't make sense for it to cover more than a year for most people.
My advice is: