An aquarium filter, if properly maintained on a regular basis, will work efficiently and last for years. Filter maintenance is basically the same whichever type of filtration you have, it's main purpose is to ensure that the water flow through the filter doesn't become too restricted.
Under-gravel filters are the simplest to maintain, use a gravel cleaner to remove any build up that could clog the under-gravel tray and stop the water passing through evenly. If the under-gravel filter is powered by an air-pump replace the air stones every six months and the air pump diaphragms every couple of years. If your under-gravel filter runs on power heads check and clean the impellers monthly.
The impeller is the mechanism which moves the water in virtually all power filters, power-heads and canister filters. It is usually contained in it's own housing and consists of three parts: the impeller shaft, the blades or fins and a magnet. The magnet and fins are usually connected together and should slide easily out of the pump. The impeller shaft may or may not be fixed in place, it is usually made from metal or ceramic and care should be taken whilst cleaning to ensure that the shaft doesn't become bent or broken. When cleaning the impeller, remove the magnets and fins (these can be simply wiped clean) and clean within the housing using a soft clean toothbrush.
If your filter is of the internal power filter variety you will need to remove and clean the sponges. This maintenance should be carried out on a monthly basis but if you notice that the water flow is reduced you may wish to clean your sponges more often. It is essential that you DO NOT clean the sponges with tap water. As discussed previously, chlorine will kill the bacteria that have colonised in your filter. Using the bucket you keep for water changes, add some of the mature water from your aquarium and use this to clean the sponges. You needn't be too thorough with the sponges, the aim is to remove the excess weight not make them spotlessly clean. Clean too stringently and you will kill the beneficial bacteria.
External or canister filters are perhaps the most difficult to maintain. Luckily these types of filters usually require cleaning less often that other varieties. The same principle's hold true for your canister media as it does for any filter media. ALL filter media should be washed with mature tank water and NEVER with tap water. The media in canister filters varies from fish keeper to fish keeper but usually consists of a combination of sponges, ceramics, sintered glass and filter floss. The sponges should be replaced when showing signs of tearing but ceramics and sintered glass will last you for the lifetime of the filter. Filter floss should be replaced every time the filter is maintained.