I have parts in my inventory that look like than be used to upgarde droids but how or where do I go to do that?
If you mean literally "parts", those can be used to repair and activate defunctional droids you will find on some maps (that have hostiles). These droids may patrol around a little and fight some enemies on that map, but they will not follow you, nor will they become your party members. Once you find such a droid, you just target and click on it as you would with any other object you can interact with. This gives you a menu through which you can spend the repair parts to activate and possibly reprogram or upgrade the droid (having higher repair skill reduces the number of parts you need to spend). It is not possible to give these droids any items.
Apart from that, there are various droid parts that are analogous to the armor, implants, weapons and headgear your characters can wear. To use these, you must have a droid in your party. If you just follow the story, you will eventually get one on Taris (the starting planet.. assuming you are talking about the first KOTOR) from a droid shop. When you get to that point, you will use the equip screen to wear these parts, as with any other party character.
Later on in the game, you may have another droid.
In KOTOR2 you have these same features, but you might also find a few parts that need to be installed by clicking on a certain droid, as if you were trying to talk to it.