Why do some aircraft have multiple ailerons per wing?
General Reasons

There are three main reasons for having multiple ailerons per wing on large aircraft:

Aileron Reversal

On a large aircraft, at high speeds a deflected aileron can twist the wing enough to cause a net roll torque opposite to the one intended.  The further out on the wing an aileron is, the more likely this problem is to arise.  For high-speed aircraft, this necessitates an outboard/inboard aileron, with the outboard being locked out at a certain speed limit. On the Airbus A380, the downwards motion of the outward aileron is locked out at 240 KIAS, and upward motion at 300 KIAS.

Systems Redundancy

Another issue is that on most large aircraft, it is simply infeasible to have cables running through the aircraft, so hydraulic systems are used instead. Having ailerons split would allow for more redundancy of system failures, allowing more controllability in these failure conditions.

Load Alleviation Function

Building on what Bret Copeland has already discussed in his answer, multiple ailerons can be used by fly-by-wire computers to flex the aircraft's wings in a specific manner to allow for less loading on the wing during cruise (counteracts the wing's natural tendency to flex upwards), as well as allowing for dynamic turbulence alleviation.

One of the examples of using this is in Airbus's Safety First magazine (July 2012), where they use the flexibility of having three ailerons to tune out lateral accelerations in the rear of the aircraft changing the gains of each of the controls. By being able to move the centre aileron a fraction after the inner aileron, they managed to avoid these initial shifts during flight testing of the A380.



Other Aircraft

The majority of airliners have multiple ailerons, however in some instances (such as the Airbus A310), there is no outboard aileron -- this function is replaced by spoilers.

Another example of using computers on multiple ailerons is the Boeing 747-8, with the use of the outboard aileron to fix issues relating to the development of flutter in certain extremes of the flight envelope, called the Outboard Aileron Modal Suppression (OAMS) system.