For the substrate question I cant help there too much. In my tank I started with play sand and added many different types of "Live Sand" from LFS in the area so I have a mix of who knows what in my tank.
The rocks that you are talking about is called "Live Rock" and has bacteria that convert ammonia into Nitrite and Nitrite into Nitrate. Live Rock can take out nitrates but it happens generally much to slow to make an impact. Plants called macroalgae like Calerpa and Halimeda will remove excess nutrients and nitrate out of the water.
I will assume by "maintaining a clean tank" you mean controlling algae and excess food/fish wastes, etc... In general this is a pretty big question to answer, but in short much of that general "maintaining a clean tank" is done by the clean-up crew (also called janitors). These are mostly crabs and/or many types of snails. Also things like starfish and some shrimps will scavange alot of waste and leftover food from the tank. As for fish there are a few specific types that help. Lawnmower Blennies (also called Sailfin and Algae blennies) are good for things like hair algae. Neon Gobies and cleaner wrasse will clean parasites off of your other fish. From what I have heard the neon gobies are better for this because many people have better success keeping them (as many cleaner wrasses seem to be wild caught and many neon gobies being tank bred). Cant say how many are wild caught compared to tank bred, but thats what I have been reading alot about. The neon gobies also seem to be better cleaners overall. Well thats alot to digest at once and I am going to spare you more of my rambling, any questions feel free to ask. I can try to find you some links if you are looking for more information or clarification on things. Good luck and hope this helps.
Rick