Welcome
The filter cleans the water as you might have already guessed. It contains sponges or other media that bacteria grows on.
Basically:
1. Fish waste / uneaten food gives off ammonia. Toxic to fish.
2. Filter contains bacteria that consumes ammonia but releases nitrites instead. Nitrites are also toxic to fish
3. Filter contains a second set of bacteria that consumes nitrites and releases nitrates which is harmless.
If you don't have one already buy yourself a decent freshwater test kit such as the API liquid one - if you got given one check it's under a year old else you may get false readings. You're aiming for zero ammonia, zero nitrites and nitrates in the region 10-60ppm.
Every so often you need to change part of the water, I'd suggest 10-20% each time. When you refill it is important to use some de-chlorinator as the chlorine can kill the good bacteria. Make sure it's room temperature too.
As and when your filter slows the water flow down, take care to clean the sponges/whatever in old tank water - not under the tap (remember chlorine kills).
That's the chores over with, and there's loads of additional information on this forum.
As to the fish, did you have anything in mind? Bare in mind those african cichlids can get territorial and aggressive. Stick a photo of the fish up and we can check what they are and admire the tank!