If you have aquarium sand in the tank typically it would be in a salt water aquarium. Most people with fresh water don't have sand. They use gravel. The sand has a tendency to get kicked up very easily, and with a lot of fresh water filters they have a sensitive filter where if the sand finds its way into the intake assembly it'll destroy the filter. So for that reason alone most people go with gravel for fresh water.
But, if you have sand in your aquarium you want to clean it just like you would regular aquarium gravel. I recommend using the siphon method where when you do your regular water change every two to four weeks you want to siphon water out of the sand bed, just like you would the gravel, to free a lot of the detritus, fecal matter, and waste that's been accumulating. And that's what detritus is, it's waste. You want to free all that so you don't have to rely so much on your filtration to remove it. You want to physically remove it when you do your water change. It's killing two birds with one stone.
So, remove some of the decorations from your aquarium to get access to the waste that's in the sand. And just do a nice siphon using a few five gallon buckets. I don't like running the hose directly into the sink because any sand, and believe me you will suck up some sand, that gets into the drain will clog your drain eventually. It's going to sit right in that little bend below your sink and result in clogged pipes, and it's going to cost a lot of money to have a plumber come and fix it.
But those are the techniques that you want to use to clean the sand. You can also run your fingers through the sand just to free some of the waste. If you're not doing a water change, you're in a rush, or every few days you get some stuff that builds up just keeping that sand bed alive will help to keep the tank healthier.
Remember, when waste gets trapped in the substrate it prevents water flow. It's convection currents that move water freely through the gravel and even through the sand, and those convection currents allow the bacteria access to the oxygen and the waste that it needs to thrive. So, by unclogging the sand it will create a much healthier, stable environment for the aquarium.
There's also sand sifting snails, and fish, and brittle stars, things that keep the sand bed alive. Those things are also beneficial to creating a very balanced ecosystem.