What f stands for in the f-stop values
f stands for the focal length of the lens. An f/1.8 lens has the entrance pupil diameter of D = f/1.8. An 85 mm lens at f/1.8 aperture will have the entrance pupil diameter of 85/1.8=47.2 mm. A 24 mm lens will have the pupil diameter of 24/1.8=13.3 mm. Since the amount of light passing through the lens is proportional to the area of the entrance pupil and the latter is proportional to the square of its diameter, the 85 mm lens will apparently collect
(47.2/13.3)^2 = (85/24)^2 = 12.5
times more light. However, this consideration is only true for the amount of light, collected from each individual point of the object, not the total amount of light arriving from the object space.
Same f-number, same exposure (independent of f or D)
One thing that I also used to find confusing is that the amount of light collected at the sensor with the same shutter speed by different lenses with the same f-number is the same. How comes if one lens is clearly larger than the other?
Here is an illustration of what happens in the camera:

For simplicity, the object is assumed to be at infinity, so that all rays from the same object point are coming parallel to each other. The red solid rays enter the lens parallel to its axis, and are all focussed in the centre of the frame. The blue dashed rays are parallel to each other but not parallel to the axis. They all focus at the edge of the frame. Thus, the frame size together with the focal distance of the lens determine the field of view of the lens.
(Note that since I made the object distance infinite, the field of view in the object space is an angular one.)
If we change the lens to the one with a longer focal length while keeping the frame size the same, the field of view of the lens decreases:

Thus while the lens still collects the same amount of light from each point in the object space, the size of this space is smaller, so the total amount of light reaching the film or detector is reduced.
This reduction is proportional to the increase of the focal length, i.e. the amount of light with the same D is reduced by a factor of (f2/f1)^2. (It is squared because we need to take into account the reduction of the field of view in both directions.)
If we now increase D by f2/f1, we will again collect the old amount of light (since it's proportional to D^2). The f-number will become: D2/f2 = [D1*(f2/f1)] / f2 = D1/f1. Thus, if we want to collect the same amount of light while changing the focal length, we need to keep the f-number constant.
Frame size matters
The last parameter of interest is the frame size. Take a compact camera with the same f-number lens as a full-frame SLR. If the size of both the lens and the sensor are scaled down proportionally to the focal length, the two cameras will have the same field of view. The compact camera will collect less light than the SLR because its lens is smaller. However, it will still give the same exposure value on the sensor because exposure is the amount of light per unit area.
If the two cameras have the same resolution, the exposure will be the same but the actual amount of light on each pixel will be greater with the bigger SLR camera, resulting in lower noise.