First you should have a visa stamp in your passport to enter the US.
If you are entering the US as a visitor, then it is up to the BCIS officer at the POE who will decide your LOS. Normally it is 6 months.
If you are entering the US as a H-1B then you will be alloed to stay till the expiration of your I-797.
Yes, you will be given a I-94