as per the 3.5 rules, there are generally only two different Degrees of cover : Cover and Better Cover. There are also two different Types of cover, Hard Cover and Soft Cover.
Ill explain hard and soft first: Hard Cover is a wall, a doorway, a corner, etc.; Anything Permanent or Static in the combat is Hard Cover. Hard Cover grants you +4 AC versus ranged and melee attacks. Hard Cover also provides a +2 bonus to Ref Saves against affects which originate or burst out from a point on the other side of it (ie Lighning Bolt), but not against Spread affects (ie Fireball).
Any Creature or animated object that is moving around, and for your particular initiave count happens to be between you and your target is Soft Cover. Soft Cover provides you with +4 AC versus Ranged attacks and melee attacks with reach weapons and no bonus to Ref Save.
Cover is determined where a strait line between any corner of your square and any corner or your targets square crosses either Soft or Hard cover. You may not make an AoO against a target that has cover from you.
Better Cover is where there is (obviously) more in between you and your target. A good example of Better Hard Cover is an arrow slit. Better Hard Cover grants you +8AC vs Ranged and melee attacks (and you will proably need to use a bow or spear to damage you foe, an axe or flail isnt likely to fit), a +4 bonus to Ref Saves (same conditions as above), and Improve Evasion vs. effects that you get the Ref Save Bonus against.
Better Soft Cover is harder to quantify, although 3-4 or more creatures in line between you and your target is about where i would call it Better Cover. Better Soft Cover provides +8AC to ranged attacks, and melee attacks with a reach weapon(mighty large reach weapon, that), and no bonus to Ref Saves.
You can also get Hard Cover from Low Obstacles :a low wall, a table (anything up to Half your height) as long as you are within 30 ft of it (if its more than half your height, its not a Low Obstacle :you get cover regardless of how far away you are from it). You may ignore the AC bonus that a Low Obstacle gives your opponent if you are closer to it than they are.
As far as Firing into melee combat goes, There are two different modifiers. Firing into combat itself gives you a -4 penalty on your to-hit roll. If one of your freinds is in the way, or there is a wall or corner in the way, that is providing him Cover, and he gets +4 AC. Effectively, it is a total -8 modifier to your chances to hit him normally, but it is important to distingush between your penalty to hit and his bonus to AC for this reason: If you fire into melee, and your opponent does not have cover, and you miss him, you miss the entire melee and hit nothing. If an ally is providing cover, and your to-hit roll misses your opponent, you miss everything and hit nothing(this is a change from the 3.0 rules)
Also, one last interesting point, if combatants are engaged in melee, but your opponent is more than 10ft apart from the nearest freindly, the -4 penalty for firing into melee does not apply to hit your opponent(your freind, Mr Giant, and his nemesis, Mr Evil Giant, are fighting with glaives 20 ft apart for example).
*EDIT* also an interesting point - you are only a Low Obstacle to anything twice your height, so it can ignore any cover you provide to people behind you if it is close to you than they are. For Example - Joe Fighter(6ft 1in) is fighting a 15ft BBEG with a 15 Foot reach, and is standing Toe-to-toe with it. There is an empty square behind Joe and in the square behind that stands Unluck E. Wizard.
Mr. BBEG has cover from U.E. Wiz, but not from Joe. Neither Joe nor U.E. Wiz have Cover from Mr. BBEG, and if hes a Smart BBEG, Mr. wizard gets to be Mr.Goo E. Wizard. However, if Billy Bob Cleric happens to be in the empty square between Joe and U.E. Wiz, then Joe provides Bob cover(since both Bob and BBEG are the same distance from Joe) and Bob provides U.E. with cover(since U.E. is closer to Bob than the BBEG is). On the other hand, Joe provides BBEG cover from Bob, and Bob provides BBEG cover from U.E. wiz (since neither Joe nor Bob is Low Cover to the people behind them). As a bit of insanity from these rules, a pair of 50ft tall dragons standing 15 ft apart have cover from each other from a 5ft tall, 5ft wide, 50ft long curb placed evenly between them. Hope this was helpful. Have fun!