I'm going to go with examples to try to explain this as best as I can.
Edit - I just noticed the post above my also used an example. My fault for basically reposting.
Let's say I'm playing a 3rd level Barbarian. That means my Base Attack Bonus is +3. Let's also assume my strength is 18. That means I have a +4 modifier to strength. Let's also say my Dexterity is 16. That means I have a +3 modifier to Dexterity.
Now, let's assume I'm attacking someone with an Armor Class of 18. Armor Class is a measure of how hard someone is to hit. To see of my attack would hit them, I would roll a d20. To this roll, I would add 7 - this number is achieved by adding my Base Attack Bonus (3) to my strength modifier (4). If the total of my d20 roll plus 7 meets or exceeds 18, I have successfully scored a hit against my opponent.
Now, for damage. Let's assume I am using a Bastard Sword. This does a d10 for damage. If my attack was succesful (and, for this example, we're going to assume it was), I would roll a d10 and add 4 to it. The 4 comes from my strength bonus - you always add strength bonus to damage from melee (hand-to-hand) weapons.
If I were using a Long Bow to attack, I would roll a d20 and add 6 to my roll to see if I meet or exceed my opponents Armor Class. The six is dervived from adding my Base Attack Bonus (3) and my Dexterity modifier (3) together.
For damage from the long bow, I would simply roll a d8 and add nothing to it.
Note - whenever you make a melee attack against someone, always add your strength modifier to it. Whenever you make a ranged attack, always add your Dexterity modifier to it. There are ways this can change, but it complicates things, so I wont go into it right now.
I also apologize if this seems to be talking down to you - I am simply explaining everything, as I do not know how much you know. My remarks are not meant in any way to insult you, I am just trying to give you all the info you need.