i am not good to physics so how i can convert 9v to 5v? its possible to do this with 20kΩ ressistors and if yes how i should place them? 9v to 7v what i will need?
A reistor can only drop voltage in proportion to current. If your current draw is fixed (a LED or lamp, say) then you can calculate a resistance that will drop the right amount of voltage. For example, if your load is 10 mA, and you want a 4V voltage drop, then you can use a 400 Ohm resistor (4V / 0.010 A)
Input voltages are seldom constant, though, and only the most boring loads are even -- an amplifier, or a digital circuit, or really anything beyond a fixed light or heater, will have variations in current draw.
The simple solution is to use a linear voltage regulator, which can act to vary their resistance to generate the output voltage you want. The 7805, shown above, can take 7V to 25V in, and generate 5V out. Another linear regulator is the LF50AB, which can take betweren 5.4V and 16V in, and generate 5V out. (Note the much lower minimum drop-out of 0.4V instead of 2V!)
Resistors and linear regulators burn off the additional energy as heat. This is inefficient. If you are using a battery, and want it to last longer, you want to be able to deplete the battery from 9V to 3V and still get the output voltage you need. To do this, use a boost/buck or SEPIC switching DC DC converter circuit. For example:http://www.pololu.com/catalog/product/2119