A tower shield typically grants a Medium wielder total cover against melee attacks launched by Medium foes from the square opposite the shield and from similar foes' melee attacks launched from the squares to the left and right of the square opposite the shield…
The tower shield says
As a standard action, however, you can use a tower shield to grant you total cover until the beginning of your next turn. When using a tower shield in this way, you must choose one edge of your space. That edge is treated as a solid wall for attacks targeting you only. You gain total cover for attacks that pass through this edge and no cover for attacks that do not pass through this edge.
Then Cover says
When making a melee attack against an adjacent target, your target has cover if any line from any corner of your square to the target's square goes through a wall (including a low wall). When making a melee attack against a target that isn't adjacent to you (such as with a reach weapon), use the rules for determining cover from ranged attacks.
So to determine if the defender has cover from them, the Medium foes armed with longswords occupying the left and right squares opposite the tower shield must draw a line from the least advantageous corners of their squares to the most advantageous corner of the defender's square, and such a line will go through the tower shield, giving the defender total cover.
…But for foes making ranged attacks and using reach, it's a little different
Cover also says
To determine whether your target has cover from your ranged attack, choose a corner of your square. If any line from this corner to any corner of the target's square passes through a square or border that blocks line of effect or provides cover, or through a square occupied by a creature, the target has cover (+4 to AC).
Thus, if attackers are employing ranged weapons or attacking with reach, to determine if the defender has cover from their attacks, the attackers, instead, pick the line to be drawn from their most advantageous corners to the defender's most advantageous corner.
While this still leaves the defender with total cover from attacks by the typical Medium attacker on the shield's opposite side, it's unclear if adjacent foes to the left and right of that attacker that are armed with ranged weapons are likewise impaired. The typical Medium creatures to the left and right of the shield opposite side can pick a corner that causes the traced line to skirt the tower shield's border, which would normally be sufficient to grant the defender cover (therefore total cover via the tower shield), but it's only from attacks that pass through the tower shield's edge against which the defender gains total cover, and whether this is through enough is a question for the GM. Ask the GM if it's possible for a dude with a crossbow to run up to the diagonal edge of your tower shield and cap you with a crossbow by, essentially, shooting around the tower shield. If the GM rules it is possible, admire such a foe's bravery before gutting him.
How hard is for you to hit the target is how well you see it which depends on the angle of visibility. See the pic below, the left 'person' sees the other one just as well as if there was no stone and can attack normally, while the one on the right has a limited view and has to contest a higher AC. In this case it is a side view (shooting above the stone) but it works the same way if it were a top view (say, shooting from behind a tree).
That's essentially why arrowslits work.
Best Answer
Shields don't provide cover (to the wielder), they provide an AC bonus
The relevant text from Raise a Shield states:
A tower shield goes beyond this to allow you to Take Cover behind your shield while it is raised:
Notice that while the bonuses are similar (standard cover provides a +2 circumstance bonus to AC, and greater cover provides +4), the shield text doesn't use the word "cover" to describe its bonus, at least to the wielder of the shield.
Tower shields do, however, provide cover to others if they are raised, as I've previously detailed in this answer to another question. The Cover rules state:
In short, your tower shield (while raised) gives you a circumstance bonus to AC and gives your ally cover if you are between them and a threat.
If you're searching for a way to explain this using plain language, cover is obtained from an obstacle that you aren't controlling. A shield is something you can control, so you're able to use it more effectively than static cover.