In general, things get hot when current flows through them. A properly-connected capacitor shouldn't have current flow in a DC circuit, so it should not warm up. So as others have pointed out, your capacitor is most likely connected backwards, and you should disconnect it immediately. Lucky you didn't use a tantalum, that would probably have just exploded! The side with the stripe on it is the negative pole, which should connect to the - lead of a battery.
You may wish to do some more basic reading about electronics before getting too much further. You could burn yourself pretty unpleasantly.
As a point of general reference, it is possible for an electrolytic capacitor to heat up even during normal operation, if the capacitor is exposed to ripple currents. This is a situation where the capacitor is rapidly charged and discharged, either partially or completely. For example, on the output of a rectifier, or in a switching power supply. Electrolytic capacitors have ripple current specs for just this reason.