H1-B is a working visa. If you hold a H1-B, you can work for 3 years, then renew it for another 3 years. If you just have H1-B visa, you are not qualified for applying EAD and AP.
After you fill in your I-485, you can get your EAD and AP. Sometimes, you don't need EAD. For example, in your 2nd year of H1-B, you fill in your I-485 with the INS, you can just apply for AP and continue to work legally. Before your H1-B expires, you can either apply for EAD or renew your H1-B.
AP is for your en-enter of USA.