To sell cargo you must dock at a space station. Follow the bot ships and copy what they do to dock. You have to come to a complete stop within the docking area.
If you have docked at stations but don't see the cargo option, it may be due to your monitor resolution. I just released an update yesterday allowing the game to support resolutions as low as 1024x768. Prior to that, vertical resolutions lower than 1050 were cropping out the cargo part of the station menu. If you are playing version 0.9.0, download the new version 0.9.1 for an improved station menu at low resolutions!
If these do not sound like your problem, please let me know your version number, platform (Mac or PC) and a screenshot if you can.
The station menu should look like this: