why there is a capacitor in the input voltage of a chip?

i notice that there is a capacitor plugged in to most chips with input voltage of DC, i understand it’s used to filter the voltage to remain steady as possible, also i heard that i need to choose a capacitor with voltage of twice the voltage i supply.

but i don’t know how to choose the capacitor in Farade wise…

in most datasheets there is this information, but not in all of them.
and if i need to design my own chip, how to choose a capacitor (Farade)???

What circuit are you referring to?

Most people use a 100 nF capacitor across the power leads of each chip (if possible), as close to the chip power pins as is practical.

Voltage regulating chips like the 7805 have an input filter capacitor to dampen voltage fluctuation at the chip when there is a long distance wire run from the power source. Inductive/reactive voltage variations can impact the regulation characteristics of the chip. Some data sheets include this info.

I don't know of any formula to determine what farad cap to use for a particular situation.

If it is RF (radio frequency) use a very small cap.
If it is to provide power, use a very large cap (such as a 1000 farad supercapacitor),
In most things in between, I would try a .1uf or .01uf.

For individual chip filtering, 0.1 µF represents the largest convenient size of a ceramic (low inductance = low ESR) capacitor.

By and large, electrolytic (though Tantalum are pretty good but sometimes have reliability problems) capacitors have a significantly higher inductance, so where you need them you need a parallel ceramic capacitor in addition.