How static electricity gets build up and how it gets discharged?
Question: Some thousands of voltage is generated when you walk on carpet or even on dry concrete, floor. How this charge gets accumulated continuously and never gets discharged?


Answer: See at end under "research" for charge generation methods.
 In your case rubbing or "triboelectric effect" is almost certainly the main mechanism.

Importantly - the generation methods do not contain reciprocal discharge mechanisms.
 For discharge to occur the conditions for discharge need to be met separately. If they are not met - eg warm dry conditions with good insulation to other differentially charged objects  then discharge will not occur. Charge will accumulate on the capacitor that the body forms relative to ground. For a given amount of charge, the lower the capacitance the higher the voltage.

$$
C={Q \over V}    
$$

$$
V={Q \over C}    
$$

$$
Q = C V 
$$

                              Energy:


$$
E={1 \over 2}C V^2
$$

So for a fixed charge, halving capacitance means double voltage, and voltage is a squared factor in energy.


Question:  Why it discharges through your fingers, when it is really built up on your shoes or clothes. If you touch you clothes with the door knob nothing happens but if you touch your finger, boom, you get shock? How does the whole process work?


Answer: Discharge will occur when there is a low enough resistance path to some other body for the charge to drain through it - ie for a current to be created. There will ALWAYS be a discharge path BUT it may be of such large resistance that the discharge time is long. If the time to discharge is more than say ten seconds to half discharge then you may notice the effect and if the half-charge discharge time is more than one minute  you are almost sure to discover it. 

Charge is stored in capacitance. That's a whole area in its own right - but your body has a capacitance if typically 100 pF to ground -  see Wikipedia body capacitance article. The objects attached to your body that generate most of the charge have low capacitance compared to that of your body. Charge is stored in proportion to capacitance so your body acts as a reservoir for the charge "generated" by your clothing. 

You will feel pain from "shock" when discharge energy rate and magnitude fulfill some complex relationship. If the discharge current is too low you will not feel pain or shock sensation. 

Touching clothes etc to a grounded object provides a very high resistance path to ground so charge transfer is slow. Charge does flow from your via clothes to ground but the all imporant enegy transfer rate is low. 

If you touch a grounded object wit part of your body then charge stored on your body has a low resistance path to ground and you will be much more likely to fel "pain" than if the discharge path was low resistance. If you touch hair or dry clothing to ground, the discharge path resistance may be 10's to 100's of megohms and you will feel no pain 0 even though these objects generated the charge that your body stored. 

1000 V on a 100 pF capacitor contains about 0.1 millijoule of energy !!! - and you may feel the discharge. A 10 kV voltage on 100 pF stores about 10 mJ or energy and you WILL feel the discharge if you touch ground.

If a group of 6 or so people all hold  hands and shuffle across a static inducing carpet and one person extends a finger and touches an unattached person  then all 7 people get a substantial shock but especially the two at the main contact point. Ask me how I know :-). 

Warning: When fully charged it is a bad idea [tm] for the finger pointer to touch a filing cabinet with their outstretched finger !!!. Ask me how I know :-). In the latter case the filing cabinet will be a large capacitance in its own right and at ground potential due to leakage via its path through its base and carpet etc.



Research:

Most of your questions seem to be answered quite well by Wikipedia's static electricity page.

They include links to charge generation by:


Tribolelectric effect  rubbing
Piezeo electric compressing or bending or twisting
Pyroelectric - heating or cooling
Electrostatic induction - separating a charged object into 2 or more parts


You will usually be experiencing mainly a combination of Triboelectic and induction effects.