RAT's or also commonly known as Remote Administration Tool's or Remote Administration Trojans, depending on what your intended use is for they basically all work the same way.
How do they work?
Many use a client-server type setup where the program run on the administrators computer would be the client and the file to be run on the computer you wish to control would be the server. Once properly setup and the computer you wish to control has run the "server" you can perform many tasks as if you were sitting infront of the computer yourself, this includes.. Remote Desktop, File Transfer, Password recovery, Viewing through the webcam, capturing sound through the builtin mic, keylogging and much more.
The Legal Stuff
Though many RAT's are intended for legitimate use there are also users that would perform not so legal operations, regardless of how it is used as long as you have the permission of the computer you are controlling it makes it legal.... in most countries anyway.
RAT Software
There is a variety of programs you can choose from to perform your tasks, depending on what you would like to do and how computer savvy you are some are easy to use then there are others which provide a more daunting task to setup. A few if not all RAT software are classed as malware due to the misuse of the programs through the years which does make it harder to install on a computer with up to date antivirus software, then again there are ways around it ^_^. Lets take a look at the various RAT programs available.
-DarkComet (Simple and easy to use, updates are constantly being applied to newer versions and provides a lot of options of control. It is also FREE!)
-Blackshade (Not free but the paid for version is worth it, it supports both windows and mac and has loads of functions also.)
-Radmin (Requires setup but runs smooth and can be quite a powerful tool. This is the most common used tool by IT Administrators)
A few others without going into too much description are..
Setting it up...
The part where most new people would go wrong, There are a few things to consider when setting up a RAT application.
-Port forwarding
-Firewall
-Anti-Virus
-Reverse-dns
Obviously you need to port forward when using a RAT program, There is also a guide that will help you in setting up port forwarding by clicking here
Your firewall will play an important part on the administrators side as it will usually block traffic that isn't permitted. To avoid this you may need to add a new firewall rule or disable your firewall.
Anti-Virus may have a bultin firewall or may restrict programs from running properly, however try to avoid having your RAT run under sandbox. If needed disable the RAT Program for the initial startup or for the duration in which you run the RAT program.
Reverse dns doesn't really affect your RAT that much but it can tamper with settings, when specifying the network settings for your Server (computer to control) and attempting to test the connection it may not work due to some network providers not allowing for connections from your own local network to connect to the internet and connect back to the network. Usually RATs will have a LAN feature builtin to avoid this, in the event you dont know if your RAT can be seen from the internet use canyouseeme.org, this handy little website will attempt to connect to a specific port on your computer and will tell you if it can see your RAT from the internet. If it says that it can see your service then you are away! computers over the internet can connect to you. If you get a message saying it cannot see your service over the internet then your internet provider may be blocking the port (try changing ports) or you havn't yet setup port forwarding (Most common issue) please make sure you check the port forwarding guide as it is needed.
Try not to use already used ports, for example.. do not use port 80 as a service may already be running on that port and if another program accepts the connection for your RAT then you are stuffed. Instead think of a random number between 1000 and 65500 any number in there will do and try that. Most RAT Programs have their own standard default ports so stick with them or choose another.