When you first buy an apple mac computer from a shop it will be Fast, because you were sold a computer with the bare minimum installed on it - OS X (El Capitan or Sierra) with basic, lightweight, applications. It's not heavily installed with Updated Security files (Security Updates), Patches (fixed/improved/updated OS X files) and too many Applications and Software Packages for example, such as Microsoft Office 2011 and Adobe Photoshop, simply because the shop is not allowed to install these for you.
Once you have bought your bare minimum apple mac computer it's your responsibility to register its OS X (El Capitan or Sierra) operating system, applications and software packages with Apple and then install any additional Security Updates, Patches, Applications and Software Packages.
If it took the shop two months to sell the apple mac computer for example that means the computer is already two months behind with software updates, application updates and security updates. Meaning, newer updates would have been released in this time. Perhaps with some new hardware (firmware) updates too. These type of updates are required to keep the computer up-to-date, and more importantly its OS X (El Capitan or Sierra) operating system up-to-date and protected against Virus Attacks, Hackers and so on.
What this means is without the updates you have a fast, but vulnerable (open to attack), computer. And with the updates the computer becomes slower and slower due to its OS X (El Capitan or Sierra) operating system being given more security/software tasks (jobs) to do, which means more memory and resources are required, which in turn means the hardware might become slower (more modem/internet data coming down the telephone line, for example, means more data that has to be translated/organised).
You install an Anti-Virus application to protect the computer from Viruses (files that are, normally, downloaded onto your hard drive and then launched to damage certain files). You then install an application to block Pop-up windows (Windows that appear suddenly without your consent. Usually with Advertisements on them). You then install an application to stop Hackers (people who try and steal information from your computer via an Internet connection). And finally, you install an application to stop SpyWare (software that monitors/collects information about your activities on the computer).
Unfortunately, in today's age, these four types of application are needed to protect the computer. If you don't install them the computer's security is at risk and if you do install them the computer uses up more memory and other resources, as well as having more tasks to do. This is because each application is constantly monitoring the computer for attacks. The information they need about the different kinds of attack are usually stored inside a file that has to be updated regularly and checked against in order to prevent/stop a specific kind of attack. When an attack has been identified the protection application still has to monitor for other potential attacks whilst taking care of the identified attack. And if a window tries to pop-up the pop-up blocker application has to destroy that window before it has chance to appear. All this monitoring is slowing the computer down.
The same applies to the Internet. It becomes slow when you have ten website pages open, as opposed to one website page open, because the web browser (i.e. Safari, Firefox or Google Chrome) is having to do ten tasks instead of one. Those tasks include saving history files (see The Hard Drive section) for each website, checking to see if you are still connected to the internet, managing uploads/downloads to/from each website and so on.
An anti-virus application uses a Virus Definition file, which is a list of all known viruses to the present day and instructions on how to identify and remove them. As a new virus is unleashed it is given a name and its Identify And Remove instructions are added to the virus definition file. When the anti-virus application starts it copies the identify and remove instructions from the virus definition file into memory, so it can quickly identify and remove a known virus. Memory is faster than a File at feeding the CPU instructions, so it is ideal for the anti-virus application to use memory. The downside of this is that anti-virus applications, and other applications that need updated files, use a lot of memory and other resources in order to protect the computer. This ultimately means a slower computer.
Having too many, unwanted/unneeded/unused, applications installed on the computer is a bad thing. Regardless if they were already installed when you got the computer or if they were installed by someone afterwards does not matter. They will be taking up hard drive space unnecessarily and/or maybe using up too much memory and other resources depending on whether or not they are actually running when the computer starts up. If this is your scenario you should have any unwanted, left-over, applications uninstalled.
Sometimes you might need to install an updated application because it improves on the previous one (such as iTunes, iPhoto and/or Printer Software) which might of improved on Media usability, storage and/or overall media quality. On the other hand it's sometimes unwise to install an updated application. Don't install the latest iTunes for example just because everyone else has or because it has a couple of minor updates/features added to it that you might never use. Go to an Internet Cafe instead and test out that new, updated, application on one of their computers. That way, if you don't like it or feel it wouldn't be worth putting on your computer no harm will have been done to your computer.
Also, don't install different types of the same software if you only need one type. Companies are to blame for this kind of thing - One company might prefer the already installed iTunes media player while another company might prefer you to install Real's media player (RealPlayer), which means you end up with two media players installed on the computer that do roughly the same thing.
When you open (launch/execute/run) an application on the apple mac computer and then close (exit) its window, the application itself is still running as a task in the background; on standby, just in case you need to use it again. So if you open the Microsoft WORD 2011 application for example, then open a document file, edit that document file and then close that document file (click on its window's red eXit button) the document file will close but the actual Microsoft WORD 2011 application will remain open (on standby). On a Windows 7 computer both the document file and the Microsoft WORD 2010 program (application) would be closed down.
So just as is the case with iPad 3 applications, the same applies to apple mac computer applications; You need to QUIT the application so that both the application and any files opened by it are shutdown (after saving/closing any unsaved/edited documents, if need be, of course).
Web Browsers such as Safari, Firefox and Google Chrome all keep a history of the websites and web pages you visit in order to speed up the display of website content. As an example; On Monday you visit the BBC website, and in particular its Sports web page which has animations, text and images on it. Safari then takes a complete snapshot of that web page (every animation, piece of text and image on that web page) and stores that contents inside its History folder.
The idea of snapshotting the contents of a web page is so that if you visit that web page again (i.e. tomorrow) safari can simply display the snapshotted web page contents instead of downloading a fresh copy of that web page's content. This is because, in theory, safari is hoping that the live web page content of today has not changed since yesterday and can therefore display the same content it snapshotted (stored in its History folder) yesterday in order to save on display time. This is okay if a web page is static whereby its contents never/rarely changes/updates, but not so good for sports and news web pages whereby their contents can be changed/updated on an hourly basis for example. In these cases safari would be forced to download and snapshot the new/fresh contents before displaying the web page.
The above also applies to other kinds of history folders/files such as application data files (i.e. settings and plist files) and search result files - History folders/files and/or Cache (Storage) folders may of been created for them on your computer. So to speed up the computer you sometimes need to clear these history/cache folders/files from your web browser and/or computer; preferably using a dedicated 'clean-up' application, as opposed to manually doing it, simply because they will have better knowledge of how to sniff out hidden, unwanted, unused history/cache folders/files as well as Log (History) files.
An application such as iPhoto suffers badly when the computer is short on memory. As an example; My 4GB MacBook Pro Laptop computer used to take ages when trying to import and catalogue 6,000+ photo files, but as soon as I upgraded the memory to 8GB iPhoto then began to run noticeably smoother and faster. And this is usually the same story for bigger applications, especially media intensive applications such as video and image applications, so always try and double up on your computer's originally installed memory.
As files, especially settings (preferences) files, become bigger and bigger the more likely they are to become corrupted; for whatever reason(s). Corrupted settings (preferences) files can mean the applications that rely on them become broken (totally unusable or partially usable) whereby they produce error messages. Or even worse; do not produce error messages but produce slowness instead. Corruption can occur because you did not shutdown the application and/or computer properly whereby its data (i.e. settings file) did not get written (saved) properly.
Having too many, photo and video, files stored on the computer's hard drive is a bad thing; especially when the hard drive is running out of space. Why? Because it means the operating system (i.e. OS X Mountain Lion or Mavericks) will not be allowed to index (catalogue) each and every file properly and therefore make file searching and file copying slower. The operating system, and more precisely its indexing service, needs to know where each file is stored and what its file size is beforehand so it can make file searching and file copying faster. Without knowing upfront what a file's size is for example means the operating system has to get that file's size information "at the current time" as opposed to already knowing it. This in turn means slower file copying when the operating system has to calculate each and every file it is trying to copy/move to another folder for example.
One of the biggest mistakes people make in terms of the operating system, usually because they want "The Latest", is to upgrade their current operating system to one that is not suitable for their current computer specifications. As an example: Many of the people who had the Snow Leopard operating system preinstalled on their new computer years ago went and upgraded to the newer Lion operating system when it first came out. And many of them since upgraded to the then latest Mountain Lion operating system even though their computer's cpu and memory capabilities were insufficient to run Mountain Lion.
As software becomes bigger and faster it also requires bigger and faster computer specifications. More memory, more hard drive space, more cpu speed and more resources per se. Something that these people may not of realised when upgrading. Hence why they wonder "Why has my computer become so slow since upgrading to the newer operating system?".
When you add all this up - Many applications writing/reading files to/from the hard drive at the same time (giving the hard drive more tasks), Many applications waiting for system resources such as Memory to become available (because of memory shortage), Applications monitoring the Internet (slowing the internet and the computer down) waiting for bad things to happen and having many applications running at the same time (so many tasks) - it's no wonder the computer slows down.
If you were given that many tasks (chores) you would complain that you're only human and only have one pair of hands. A computer is only a machine. It complains in different ways by slowing down and occasionally crashing/freezing because you were giving it too many tasks. If you follow the advise given so far you should end up with a comfortable computer - one that runs smoothly, even if it's not as fast as when you first bought it. For more reading see the Disable Unwanted Startup Applications section.
Here are some general things to observe and/or maintain when looking for a second-hand apple mac computer or when buying a new one.