There are many different factors that affect the speed of your computer, and as a result there are many different ways in which you can speed it up. If your computer is running slowly, it may be one underlying issue you need to address, or several problems that require some work. Many potential solutions won't cost you anything, though you can also opt to pay to upgrade the hardware components inside your machine if you wish to.
Uninstall programs you don't need. The more programs you have on your computer, the harder your operating system has to work to keep up with them all. On Windows, you can uninstall programs through the link in Control Panel; on Mac OS, you can use each program's uninstaller or simply drag it to Trash.
Check for programs that automatically start up with your computer. Reboot your machine and check which applications have loaded themselves into memory -- it may be that you can live without some of these. On Windows machines, search for and run the MSConfig utility; when using a Mac computer, check the Login Items tab on the Users & Groups dialog in System Preferences.
Run a spyware and virus scan. A sluggish computer can be a sign of a spyware or malware infection: to test for this, update your installed security tools to the very latest versions and launch a full system scan looking for problems. If any issues are uncovered, follow the instructions on screen to remove them.
Clean up the hard drive. Once your computer's hard drive starts to run out of room, larger files and applications get split up and the operating system has to put in more effort to retrieve them. Both Windows and Mac OS include automatic built-in defragmentation utilities, but the more spare hard disk space there is to work with, the smoother they will run.
Upgrade your hardware. This will cost you money, but you might want to consider installing more RAM, a faster CPU or a solid-state disk drive (SSD) to speed up the performance of your computer. Which upgrades are possible, and how you'll need to go about them, will depend on your existing system setup -- check the documentation supplied with your computer for more information. Upgrades are more practical for desktop machines rather than laptops.