Most plants that we commonly call geraniums are actually from a perennial family of plants called pelargonium. These plants orginate from the southern tip of Africa and can survive very warm temperatures (they need sunlight), to relatively low (just under freezing). The "geranium" flowers are easy plants to take care of. They can be stored dormant in the winter, to be regrown in the summer, or they can be kept indoors and alive throughout the year. You can most certainly grow a geranium on a window sill.
Growing Geraniums Indoors: Light and Temp
Geraniums need sunlight if they are going to flower through the year. West and south facing windowsills are the best for ideal light. You can also use artificial light. Placing the plant one foot beneath a 40-watt bulb for 16 hours per day will give it sufficient light to survive. The plants should have at least six hours of direct light per day. Temperatures of between 65 and 70 per day, and 55 at night are ideal.
Soil and Container
Geraniums like to feed, so fertilizer is a must for their soil. You can use a fertilizer pellet, or add fertilizer/compost directly into the soil. There are soils that are professionally mixed with fertilizer--this is acceptable as well. They should be fertilized once a month at least, and ideally once every two weeks. Maker sure the pot or window box you put them in drains well. The plant needs the soil to dry in between watering.