Chain is a one-slot weapon proficiency open to most classes, although it frequently occurs as an improvised weapon. People with a proficiency in chain have practiced extensively with chains (and related heavy things, in theory you could use a very heavy knotted rope, cord, leather pieces, etc.) and have experience with them as a weapon. If you have access to specialization, it is possible to specialize in chain, it is treated as a specialized melee weapon. A chain may be weighted at the ends or not, but doing so will not effect your damage or to-hit, because if you're using chain as a non-improvised weapon, you have tried different ways of using it and maximize accordingly. Chains with sharpened ends or small attached blades are counted as scourges, and if you use such a weapon without a scourge proficiency, you will take the non-proficient penalty, and probably hurt yourself in the bargain, as they are not swung the same way.
Chain can be used similarly to a flail (you hold one end and beat with the other) or as a garrote (you hold it in two hands and wrap it around the neck of the opponent.) You can wrap the chain around your hand and use it similarly to a cestus (and get cestus damage). You get the related weapon penalty (the lower non-proficient penalty) when using a flail or nunchucks, but not things divided into more than two ends (three-piece rod, for example.) You are considered to be attacking with a weapon of proficiency even if the chain is not your 'normal' chain. (For example, you need to attack with a chandelier chain that's lying around.)
On a successful called shot (-2 to -8 to hit, depending on size of target and type of attack) you can tangle or trip an opponent (this is active tripping, where you put a thing around a foot or legs and yank, not passive tripping where the opponent falls over something he cannot see). When tripping, you are treated as if you have a STR score of 4 points higher than your score. An opponent can oppose this with a successful STR roll of his own. Therefore a small creature with a STR of 6, even with a +4, might not be able to trip a giant troll with a STR of 19.
Pulling is attempting to move an opponent already in a chain (tangled on a previous hit for example or chained up in another way, such as while unconscious.) In these actions, your STR is also treated as 4 points higher because you have experience in using the leverage of a chain to manipulate various masses.
At the DM's discretion, it is possible, if the tangled or chained opponent is unconscious or stunned, and small enough relative to your strength, to swing a tangled opponent at another opponent. Assume a penalty of -1 to -5, depending, again, on the tangled or chained opponent's size relative to the person swinging it and weight relative to the character's natural STR (and this is impossible to do if the tangled opponent is heavier than your character's normal max press.) Both the opponent within the chain and the one struck will take normal chain damage (and, indeed, should take the same numerical damage, as it is an equal and opposite reaction.) If the chained opponent is particularly heavy or spiky, the DM should add appropriate damage.
A chain can also be used with the rope use non-weapon proficiency within reason. Someone with a chain and the appropriate attachments can use a chain to scale walls, chain someone up and the like, but it cannot be used as a lasso.
The default weapon size and length for a chain when used as a weapon is a 3ft length of chain weighing 1 lb per foot. (This should be understood as the "end" of just about any length of chain.) This will do 1d4+1 blunt damage to a Small-Medium opponent and 1d4 to a large. Such chains have a speed factor of 5 and are considered Large Size weapons, but unlike most large size weapons, they may be wielded without penalty by a less-than-mansized character.
Extra heavy weight chains, or chains with weights on them, may be allowed to do extra damage or assigned a different damage die, but in general, a heavy weight chain is harder to swing, so most additional damage would be accomplished by a character's STR bonus, if any.
The major downside of chain as a weapon proficiency is that you are unlikely to find a magically enhanced chain (+1, etc.) in any random loot drop. You may be able to have one enhanced by an enchanter or cleric, however.