No, you do not get a work permit immediately. In fact, unless you keep a legal status on the basis of your own study or work, you must leave the country until the priority date for the spouse of a green card holder is current - approximately 5 years.
If your spouse becomes a citizen, you can get your green card and work permit in less than a year - unless you are outside the country and have overstay that causes you to be barred for 3 or 10 years.
You need to read the USCIS website about the rules and regulations that apply to family member immigration for green card holders.