my MacBook air 13 inch has a mains power supply. The plug that goes into the MacBook is held in magnetically and has a little light showing....green when battery is fully charged and red when battery is low and being charged. Lately the plug has sometimes not been fully making contact so though green shows and MacBook runs, the battery is not being charged and on a recent occasion became 0% and screen blacked out and unable to restart........ok again after ensuring plug in red light showing and then battery fully recharged.
If you put the cursor up to the top of the screen the MENU bar should appear along the top and somewhere along it will be the battery state icon....this is a % followed by a small battery shape e.g. 50% for a half run down battery. With the mains power supply plugged in and the red light on the icon should indicate that the battery is charging....this is indicated by a lightning symbol on the battery icon. When not charging the battery just appears all black proceeded by the % of its charged state.