eg: O2(2 is in subscript) it tells united state that there are 2 oxygen atoms which have joined together to obtain neutrality charge

The electronic configuration that oxygen is = 2,6

so oxygen requirements 2 electron to become neutral ( to have actually 8 electrons in valence(last) shell )

O2 is a covalent link (if ns am no wrong) i.e 2 oxygen atom share 2 electron EACH

Al2O3 (2 and 3 space subscript)

this defines that there are 2 atoms of aluminium and 3 atom of oxygen which enabled them to end up being neutral (no charge)