Gaming Use
The reason your PC won't recognize your PS3 controller is simple: Sony purposefully designed their controllers to operate only with PS3 consoles. Although using a PS3 controller in a PC game would be very convenient, there is unfortunately no official option for this. You can easily connect a controller to your PC, but your computer will not recognize it as a gamepad. Many people have created custom drivers for PS3 controllers, but Sony has not endorsed any of these or recommended them in general, so you use them at your own risk.
PC Recharge
All you can do by connecting your PS3 controller to your computer is recharge the controller's battery. Often this isn't a practical recharge solution, but it will work if you need it. Just plug the USB cord into the controller and into a free USB port on your computer. The LEDs on the controller will begin blinking to indicate that the battery is charging. Once they stop blinking, the battery is fully charged.
Battery Status
The LEDs display the battery's status when it's charging and when it's nearly depleted; if you're playing a game on your PS3 and the battery is about to die, whichever LED is lit to display the controller's number will begin blinking, and a prompt will display on the screen. You can also view the battery's charge level anytime by pressing the PS button for a couple of seconds, and the battery information will appear on your screen.
Other Options
DualShock 3 controllers have a "rumble pack" in them to add a vibration function during compatible games. If you don't prefer this feature or if you just want to conserve battery power, you can disable it by going to the XMB menu's "Settings" section and selecting "Accessory Settings," then "Controller Vibration Feature." You can also make your controllers turn off after a certain period of inactivity, which is a great way to conserve battery life if you're going to take breaks while you play a game. Just go to the "Settings" section and select "Power Save Settings," then "Controller Auto-Off."