By far the safest (and simplest) way is to buy a LiIon charging regulator ic, something like the MAX1757 from Maxim, although there are
many other choices if you search:
**broken link removed**
Otherwise, you need to make a circuit that limits and controls both current and voltage (and preferably temperature too). It will probably cost you more than simply buying a proper charging ic.
Really, while they can even be charged (carefully) with a good laboratory power supply if you watch over it like it's a baby, I don't want to advise anything other than a proper charger due to the inherent risks. If you are determined to try, read this for the basics:
https://www.powerstream.com/li.htm
Understand this though: When a LiIon cell has been 'abused', that is, undercharged, overcharged, shorted, etc. then it can start to develop needle-like, metallic growths throughout its length. These can (and often do, if the cell is still used) eventually bridge from positive to negative parts of the cell. This can happen any time,
even when the cell is not in use, as the dendrites continue to grow. When the short happens, the worst case is an explosion, fire and burned down building. I'm not exaggerating.
Often, LiIon cells from used laptop packs are in this state. I use a Pila cell charger and monitor things myself as well for reclaimed cells. Any that look the slightest bit dodgy (get too hot, have a low final charge voltage, take too long to charge, don't seem to last as long as they should) are discarded immediately. I often use them in head-worn flashlights, and I like my forehead unscarred!