Burglary is entering a structure with the intent to commit a felony or a theft inside. First degree (residential) burglary covers inhabited dwellings (and a few other things where people live) - all other burglaries are second degree. Typically, second degree burglary is commercial burglary - entering a business to steal, but it can cover other things like burglary from a motor vehicle, etc.
Second degree burglary is a "wobbler," meaning it can be either a felony or a misdemeanor. As a felony, it carries up to 3 years state prison and as a misdemeanor, it carries up to a year in county jail.
I agree with Mr. Dane's answer. Also, second-degree burglary is sometimes charged when a person is accused of theft or shoplifting at a store. If a person enters the store with the intent to steal, then that person is guilty of burglary. If the person enters the store for legitimate purposes, but then once inside, decides to steal, then that's theft. However, prosecutors will often charge burglary and theft together as leverage for negotiating cases.
Also, burglary applies in situations where theft isn't an issue. First degree or second degree burglary is entering a building (either residential or commercial) with the intent to steal OR with the intent to commit any felony. So, for example, if someone enters a home with the intent to rape, that's first degree burglary even though there's no theft. And if someone enters a store with the intent to vandalize over $400 of property, that's second-degree burglary, even if there's no proof of theft or intent to steal.
I would recommend any person being charged with burglary to retain an experienced criminal defense attorney.