You should do a lot more research before attempting it, I am simplifying greatly. In short, people use sugar, or vodka, or other things like bio pellets to stimulate bacteria growth. As those bacteria populations grow, they also consume phosphates and nitrates.
Of course the challenge then comes to remove those grown bacteria colonies. Typically it is recommended that if someone plans to do this they have an oversized skimmer to help remove this biomass.
Results are mixed, but I think there is solid science behind it. It is something I personally would qualify as being a more advanced technique. I am thinking about experimenting with it a bit, which is why I have recently started to monitor ORP...I am hoping I may be able to use ORP as a way to gauge my carbon dosing (but this is mostly speculation on my side).