Joints are the meeting points of two separate bones, held together and in place by connective tissues and ligaments. All of the joints in our bodies are surrounded by synovial fluid, a thick, clear liquid. When you stretch or bend your finger to pop the knuckle, you're causing the bones of the joint to pull apart. As they do, the connective tissue capsule that surrounds the joint is stretched. By stretching this capsule, you increase its volume. And as we know from chemistry class, with an increase in volume comes a decrease in pressure. So as the pressure of the synovial fluid drops, gases dissolved in the fluid become less soluble, forming bubbles through a process called cavitation. When the joint is stretched far enough, the pressure in the capsule drops so low that these bubbles burst, producing the pop that we associate with knuckle cracking.
It takes about 25 to 30 minutes for the gas to redissolve into the joint fluid. During this period of time, your knuckles won't crack. Once the gas is redissolved, cavitation is once again possible, and you can start popping your knuckles again.
As for the harms associated with this habit, according to Anatomy and Physiology Instructors' Cooperative, only one in-depth study regarding the possible detriments of knuckle popping has been published. This study, done by Raymond Brodeur and published in the Journal of Manipulative and Physiological Therapeutics, examined 300 knuckle crackers for evidence of joint damage. The results revealed no apparent connection between joint cracking and arthritis; however, habitual knuckle poppers did show signs of other types of damage, including soft tissue damage to the joint capsule and a decrease in grip strength. This damage is most likely a result of the rapid, repeated stretching of the ligaments surrounding the joint. A professional baseball pitcher experiences similar, although obviously heightened, effects in the various joints of his pitching arm. But assuming you haven't signed a multimillion dollar contract to constantly pop your knuckles, it hardly seems worth the possible risk to your joints.
On the positive side, there's evidence of increased mobility in joints right after popping. When joints are manipulated, the Golgi tendon organs (a set of nerve endings involved in humans' motion sense) are stimulated and the muscles surrounding the joint are relaxed. This is part of the reason why people can feel "loose" and invigorated after leaving the chiropractor's office, where cavitation is induced as part of the treatment. Backs, knees, elbows and all other movable joints are subject to the same kind manipulation as knuckles are.