Why does a comb rubbed through hair not attract paper if it's been left alone for some time? In childhood we did an activity with a comb and paper pieces to understand electrostatic force. I noticed that after rubbing the comb in hair it attracts paper pieces very well, but when trying again with the same comb after some time, it is able to attract only a few. It seems the force became weak.
How? Did the charge get lost although the comb was unused after being rubbed the first time? Why does it become weak after some time? Can charge lost like this?
 A: Air, especially if humid (high water content), can conduct electricity to some extent.
Electrons are being repelled from the negatively charged comb and some will gradually go into the air and move away.  In this way the comb gradually loses its charge.
Perhaps you could try it on different days.  If the air is dry it should keep the charge for longer.
A: 
It seems the force became weak.

It did. By the way, your observation leads to all sorts of interesting physics! (and technology).

How? Did the charge get lost although the comb was unused after being rubbed the first time?

Exactly. Air is not a perfect insulator, so electrons "escape" from the surface of the comb and are dissipated in the environment. They just, so to speak, "jump off" (or "on") the comb.
Also, as @AndrewSteane has noted, the comb probably rested on something, and (depending on the comb's material) electric charges might be able to migrate away from the comb, equalizing the charge. Here, again, humidity accelerates the loss.
"Air-jumping" happens more the more an object is "pointy". Points, or technically speaking, regions with small curvature radius, can accumulate more charges and "spray" them in the environment. That is why lightning rods are pointed, by the way. When large (which requires very high voltages!), this effect is called corona effect, and when very large the discharge is visible to the naked eye, and takes the name of St. Elmo's Fire.
Another factor is the air "quality". The more humidity, dust particles, or ions are present, the more conductive the air is and the faster a charge is lost. Again, this effect is used in electrostatic dust filters (air flows near charged pointy rods, and the dust gets charged directly or by induction, getting smashed against counter-charged plates by the electric field; air flowing past the field is then dust-free, or at least much less dusty).
Exactly the phenomenon you observed can be used to detect the ionization of the air that is caused by radiation. You charge an electroscope, which is a pair of very light gold leaves inside a sealed bottle of very dry, very clean air. In those circumstances, charge is retained for a long time, and the leaves, both charged with electricity of the same polarity, repel each other, so can't fall down but stay in a sort of "A" shape.
If a radiation source is present, the air in the jar gets ionized, the charge is dispersed, and the leaves fall down (an electroscope used for this purpose has an outer plate that is detachable, and can - and will - only detect radiation getting inside the jar: so, for example, no alpha rays. To detect the weaker alpha radiation you need to expose the outer plate to the environment, and charge will then always be lost anyway at a speed depending on the humidity, etc.).
You can see several electroscope videos on Youtube, depicting the "charge loss" with time (I have searched for one that demonstrated faster charge loss in the vicinity of a radioactive source, but found none. But we ran that experiment at my school years ago).
You can even build an electroscope yourself and see visibly the charge decrease in time in different conditions. There are several tutorials on Youtube too ("Make your own electroscope").
A: The charge on comb slowly dissipates into environment or paper over the time. So net charge become zero after sometime and comb loses attractive property.
Yes charge can be lost like this.
A: Are you asking why the electrostatic charge doesn't persist indefinitely?  Because it leaks away.  Whatever it's sitting on is not a perfect insulator.  Even if suspended in mid air, the air isn't one either!
Or are you asking why the same comb rubbed through the same hair becomes less effective after several tries?   Probably grease in your hair acting as a conductor.
A: Air is electrical insulator, but once in a while one of the air molecules gets ionized by a natural environmental event (for example, being struck by an ultraviolet photon or cosmic ray particle), to create a positive ion and a free electron. Air also contains small amount of ions because of natural radioactive decay of radon gas. The isotope of radon 222Rn is produced by the radioactive decay of radium's isotope 226Ra. This isotope of radium is extremely diluted but omnipresent in the ground in natural environment: found in uranium ores, phosphate rock, shales, granite, gneiss, schist, and to a lesser degree, in common rocks such as limestone. As such, radon is omnipresent in the air all over the world in varying, small quantities, and its presence contributes to the formation of ions in the air: each decaying radon atom ejects a positively charged ion (alpha particle) and transmutes into its daughter product (polonium 218Po) which itself initially exists as a charged ion because of the conservation of charge. 218Po is also radioactive and decays after some time, creating more air ionization, and so on. Electric field created by static charge on the comb accelerates the positive ions and free electrons in opposite directions, and these ones of them which have the opposite charge to the comb are attracted towards the comb, resulting in neutralization of charge quants upon collision. One such quanta is minuscule, but such collisions happen so frequently that the charge slowly leaks away and ultimately results in complete neutralization.
In response to your comments under other answers (paraphrased the relevant part):

Doesn't the environment get a negative charge like this?

It does, but while you were negatively charging the comb via rubbing it in your hair, you were also simultaneously charging your hair -- it is just that your hair got the opposite (positive) charge of the same magnitude. The static charge accumulated on your hair discharges away in the same manner as the charge accumulated on the comb. The environment gets some positive charge from your hair, and some negative charge from the comb, but the net charge from both the comb and the hair is ultimately zero.
By rubbing the comb in your hair you did not create charge out of nothing; you just created an imbalance of charge because the comb stole some negatively charged particles from the hair.
