There are several reasons why your pond gets dirty.
If the water turns green, generally that means your pond is exposed to too much sunlight, if it is a geographical limitation then there is generally little things you could do about it. It is the algae, and anything that kills the algae also kills the fish in there. Rare a few catfish (called longkang/bandaraya fish) A healthy pond must not be exposed to sunlight more than 2 hours a day, 3 if it is a large pond and even then preferably morning sun. Direct evening sunlight is a sure way to have an algae problem. Placing some tall potted plants at the edge of the pond is a quick and easy way to fix the problem of extreme direct sunlight, else a pergola with some vine type plants will also do the trick.
The other reason is also due to the materials you used to make the pond. Stone or ceramic based ponds attract far more algae growth. Fibreglass or bitumen liner is the better material to construct the pond. Though it does not mean that there will be no algae growth, it just means that the algae does not get to stick on the surface and the constant recirculation of the water will trap the algae within the filters.
If you have fish and the pond is smelly or murky. The main culprit for the water going murky is over feeding. Try using an automatic feeder and feed the fish smaller amounts 3-4 times a day instead of a 1 or 2 big feeding sessions per day. If it is a koi pond, that feeding should only take place every other day on the same 3-4 times rather than a large feast each time.
The rest is all about the filters, a real filter will have at least 4 chambers and 3-4 different medias. On a 4 chamber box, the first chamber should be wool, it will filter out the excess foods and also the algaes. The second chamber should be ceramics, this will help to absorb the fishy smell as a result of the slimy discharge from the fish. The next should be a finer wool, it will trap junk that does not get trapped like the faeces from the fish and the final chamber is charcoal filters, this one removes the smell from everything in the pond.
The filters should be cleaned at least once a week and replaced every quarter.
Some other things to note, the water pump needs to be powerful. Suppossing your pond is 1000l then the bare minimum power capacity of the pump needs to be 1000l per hour. 1200l/hour would be better.
Fish that has better supply of oxygen tend to release less smells. Recirculating the water more tends to bring better oxygenation.
When feeding time, a sure way to ensure your water stays cleaner and your fish eats more is to shut off the water pumps and switch to an air pump while the feeding is in progress. This way their foods does not get trapped within the filters.
Changing of water, every 7 days remove 1/3 of the water and replace with new fresh water. Once every 28 days remove 2/3 of the water and replace with new.
Every quarter should the need arise, drain the entire pond and scrub the scums away. Not difficult at all. This step is not recommended unless it is really necessary.