Figure I will throw in my 2 cents as this is my favorite subject.
In days gone by we (The community) did not even know about nitrates.
Then we got a test kit but it said as long as it was under 80 ppm it was non toxic.
We did water changes to keep it under 40 ppm.
Later we came to believe high nitrates caused Algae and so we started keeping them Under 10 ppm or even 5 ppm. That is really hard in a fish only system with only WC.
In planted tanks, they get removed by plants if you have enough and are seen as plant food, not a contaminant.
The we discovered carbon dosing (mostly in saltwater tanks) and found that corals also need Nitrates in a small amount and that too low can even cause some types of algae such as cyanobacteria (AKA Blue Green Algae). This seems to happen when Nitrates are low and Phosphate and Dissolved organics are high.
So now we realize a little nitrate is a good thing.
Some are starting to believe even 80 ppm of nitrate is probably not toxic in the short term but we like to keep it lower anyways. Anything under 20 ppm I would not loose sleep over in a freshwater tank.
As far as getting rid of it:
In a planted tank use plants. Add more if needed.
Soil seems to really keep it at 0 ppm. I have to add nitrates in for my plants now.
Sand does not have this effect as far as I can tell. Unless you have a lot and it has to be a fine size. Still...over time it may fill up with waste and stop working.
In a fish only system, the best way seems to use dentirification with a product similar to denitrate or Matrix by Seachem. Deep sand beds seem to take a while to start working, then work well, then eventually break down as they become clogged. Carbon dosing works very well but in fresh water leaves a black sludge that needs to be vacuumed out or will break down and return the nitrate to the water again.
This has been my experience. I have been very interested in nitrate for about 15 years now. Turns out it really was not as big of a problem as we thought. Phosphate in a fish only system seems to cause more issues. Which are now also hotly debated
That is a whole different post