From what I can tell, your units either have no cover, partial cover, or full cover relative to an enemy unit. However, even "full cover" doesn't mean "can't be shot", as I've definitely lost soldiers to plasma rifle fire in the face when they were behind full cover.

How does cover work? What kind of defense bonuses do I get for partial or full cover? I'm looking for numbers here if possible.

Range then has a final effect on hit chance this can be positive or negative depending on the weapon. Shotguns positive hit close negative long range, snipers neutral long negative short.

Hunker down doubles the cover bonus! (cover not defence eg smoke grenade or ghost armor)
While I read many people consider cover broken inaccurate etc. I find that the game treats this very very precise except people consider aliens aim as crappy as your soldiers. They dont especially mind linked and on impossible they hit hard.

Hunker down as such should not be overlooked.
Defence and LoS is the only way to avoid damage health just lets you soak up more before you die. Big hint for all that try impossible and find they fail.

Now the numbers you asked for:

Partial cover +20 defence (Cover type)

Full cover +40 defence (Cover type)

Hunker down doubles cover type defence

Being flanked removes cover type defence

Smoke grenade adds +20 defence or 40 if skilled. (Normal defence)

Various armor adds defence (ghost +30 Normal defence)

Normal defence apply's even when flanked

I have not bothered with counting exact squares for optimal ranges yet. There is a very very limited weapon base in this game and you will get a feeling of all of them soon enough. Getting shot? Hunker down stop shooting those crappy low hit overwatch shots at dashing aliens ;) Disagree? Talk when you never lost a man on impossible :P

A nitpick: "being flanked" doesn't really mean anything in the game; it's just an indicator that, yes, you have cover, but no, it doesn't count if it isn't between you and the alien.
–
jpreteOct 19 '12 at 1:19

@RavenDreamer I thought flanking gives +50% crit? Anyway, it should be mentioned that Hunkering Down also prevents crits... but does that still apply if you get flanked?
–
bpcooksonSep 9 '13 at 12:05

@bpcookson You're right, of course. I forgot that most weapons have a base 10% crit chance, so flanking gives you 60% total chance to crit. And yes, as long as you are hunkered down, you cannot be crit, even while flanked.
–
Raven Dreamer♦Sep 9 '13 at 12:07

In the original X-COM, your units had to have a clear line of sight to the enemy. This meant that if you wanted to stay safe(r), you had to walk into line of sight, fire, and then return to your cover.

Because of XCOM's reinterpreation of TUs, this previous method is no longer possible (you'd end your turn out of cover, immediately after firing), so cover had to be changed up a little.

I find it helps to think of it like this - when in cover, your soldier occupies multiple squares at once - both the square they're currently in, and all the squares adjacent. This is why, when firing from cover, your Soldier will step out, fire, and then return to cover.

But to make this fair, it needed to work both ways - units needed to be able to shoot at those in cover too (else, strict lines of sight would prevent both parties from firing at each other in the majority of the situations). So, again, consider your soldiers as occupying all squares adjacent to them too - able to be fired upon if an enemy has line of sight to an adjacent square.

But when you can fire at a square adjacent to the enemy, "from" a square adjacent to yourself, "cover" no longer blocks Line of Sight. Instead, it reduces the enemies chance to hit. Low cover or is 20% reduction, and high cover is 40%. Using "Hunker Down" doubles the cover bonus to 40 and 80 respectively.

Think of it as soldiers and aliens alike peering around the corner, not enough to expose their whole body, but still enough to get shot at if they're not hunkered down (which reduces vision, as presumably, they're not peering out) .

It's also a somewhat strange animation choice to have a soldier who sits behind a cover actually STEP OUT of it in order to fire. It would have been, I think, a more helpful visual guide if the guy would just lean over on the side of the cover and shoot, it would have conveyed a more accurate hint as to how cover is actually treated (i.e. you can still see and can be seen even when behind it).
–
Shivan DragonOct 15 '12 at 10:58

@ShivanDragon Leaning around cover slightly to fire might incorrectly imply that firing from cover confers a penalty to your aim (it doesn't) and it is also probably very difficult (design-wise) to accommodate for all types and shapes of cover.
–
bpcooksonSep 9 '13 at 13:12