To mine commodities, first orbit the body you wish to mine commodities from. Once in orbit open the helm window and then choose system. Within this window there will be a section named bodies. Click the name of the body you wish to mine commodities from. A new window will open providing details about the body. Within this new window a section labeled commodities will be present.
Click the "mine" button next to the commodity you wish to mine.