Actaully, there are several different types of RAID (randomly accessed inexpensive drives). The ways in which each works in unique to its number (aka 1, 0, or 1-0, or 0-1). I will only discuss RAID 0 and RAID 1 here. Do a google search for the other types of RAID (2, 3, 4, 5, 6, 7, 53) Those are pointless here, so I will not discuss those, as stated earlier, at all.
The algorithm behind RAID is not as advanced as you may think, but you have to understand the RAID mechanism in order to be able to choose the best RAID settings later. The first RAID mode (RAID 0) is called stripping and it offers improved performance but no fault tolerance. The main problem of the storage interfaces today is not the peak bandwidth offered by storage electronic part but the latency and real bandwidth limitations of the mechanical device.
RAID 0 is based on idea to write/read data from multiple harddisks at the same time. The controller strips a file in smaller fragments of the user defined strip size and sends the fragments to every harddisk in the array. Supposing that you configure the controller to use a 32Kb strip size and you deal with a 256Kb file and you have two harddisks in the array every one of them receives simultaneous 4 fragments. The performance is increased since two harddisks work for the same job. Theoretically you get twice the speed of a single harddisk, but you can go even further if you use four or eight harddisks. RAID 0 is the fastest from all RAID setups and it's the reason why most people buy a IDE RAID controller for home. A special attention must be paid to the strip size. If you choose a strip size of 1Kb and you deal with large files the performance may be lower than if you have used a single harddrive. That's why controllers allow you to choose the size of the strip; it's different for every application.
It's strongly recommended to use identical drives because otherwise the performance gain is not big, the controller has to wait for the slowest harddisk to finish the operation. The total space available to the user is the sum of the disks in array.
RAID 1 stands for mirroring and uses two harddisks for fault tolerant systems. The controller duplicates the file and writes it down on the two drives in array. The performance is lower because the controller has to do the same thing twice. The data is always the same on both disks, except for the case when a failure occurs. Pay a special attention that the drives are better to be equal because the total space available to the user is equal to the size of the smallest drive in array. If you have a 10Gb drive and a 20Gb drive the space which can be used is 10Gb.
RAID 0+1 is a mode which supports both stripping and mirroring. You will need four harddisks since two of them are used for stripping and the other two for data mirroring. This mode is really only for servers, and the most popular RAID configuration is from RAID 0. RAID 1 is mainly used in specific jobs, and storage servers.
Hope this LONG explanation helps all who need to know about RAID. Now if you excuse me, I need to go dip my fingers in cold water, being that they are in flames after typing this.