How are transactions secured? I'm a programmer and want to get to know more about encryption and how Bitcoin works, but there is not much on the web describing how all this code works. It would help if there was some visual way to describe the concept of how and what its doing. 

How can someone send the public key and private key to another computer without giving away the private key? If you didn't send the private key, how would the other computer know the transaction was from you and not someone else pretending to be you?

I have read up on key pairs and have managed to generate a key pair in java. Everyone's example of 'using' key pairs is very vague. How do you "use" the key pair to confirm a transaction. I know you have a private key that signs the transaction and the public key some how confirms the transaction but i don't understand the "how" it is "used" if you send a transaction with your secret key wouldn't that no longer be a secret key? How is the public key confirm the transaction was signed correctly? How can you send your secret key out with out some one using it once they get it? If Bob sends a transaction to Tim would Tim not now have Bobs security key? 

I'm very sorry if this question sounds dumb. I'm just having a hard time understanding how you can send some one a transaction and be able to "sign" that transaction and how its confirmed. a lot of posts people are saying its Elliptic Curve Digital Signature Algorithm (ECDSA) but how is it doing all of this.
First of all, nothing is encrypted in Bitcoin, there is no "encryption" involved whatsoever. Cryptography: yes, but encryption: no.

The main aspect of private vs public key signing, is dat you can openly share your public key (that's what bitcoin balances are associated with), and then using your private key you can create a "digital signature" for a transaction spending coins from that public key. Other people can verify if this signature is correct, thus knowing that the transaction was signed by the one holding the private key. But here's the catch: this verification can be done without having the private key.

So essentially, the digital signature algorithm allows you to prove that you have the private key that corresponds to a certain public key, without sharing the actual private key.

And, obviously, neither is there a feasible way to reconstruct the private key from a given public key and a valid signature.

This is called ECDSA or "elliptic curve digital signature algorithm", because the inner workings are based on elliptic curves.

How this all works technically is somewhat complicated, there's some fancy maths involved. If you want to get into the dirty details, here's a good explanation: http://kakaroto.homelinux.net/2012/01/how-the-ecdsa-algorithm-works/