Penalties incurred when wielding a weapon with a shield are almost all based on your adjusted shield evasion penalty. This is found by:
ASEVP = Base_penalty - (Shields_skill/(5 + Size_factor)
The base penalty is 1 for bucklers, 3 for shields, and 5 for large shields. Size factor is zero for most races, -2 for large races (trolls, ogres, centaurs, and nagas) and formicids, 2 for small races (kobolds and halflings), and 4 for little races (spriggans and felids, although the latter can't use shields at all).
Thus, ASEVP becomes zero at 5/15/25 skill for most races with bucklers/shields/large shields, but at 3/9/15 for large races (although some cannot wear bucklers), at 7/21/- for small races (neither can wear large shields), and at 9/-/- for Spriggans, who can only wear bucklers.
Note that in addition to its own penalties, the ASEVP is also part of your AEVP (adjusted EV penalty), a value which is used to calculate, among other things, accuracy and spellcasting penalties. However, this article concerns effects of shields other than those from their AEVP; for the effects of AEVP, see the above article.
One-handed (1H) weapons are the most convenient weapons to wield, regardless of size. Any species can use a one-handed weapon with a shield, and will only suffer the standard shield penalties to speed (which can be negated through the Shields skill). One-handed ranged weapons, like slings, don't suffer any shield penalty at all.
The specific penalty for one-handed weapons wielded with a shield at insufficient skill is an added delay of min(1dASEVP, 1dASEVP). This is not generally very noticeable, although a character wearing a large shield at zero skill will notice a difference.
Two-handed (2H) melee weapons simply cannot be used along with a shield, unless you are a formicid. They usually deal extremely heavy damage to make up for this restriction. You may use two-handed ranged weapons with a shield, but you will suffer a severe penalty to the attack delay. Formicids can use any two-handed weapon as if it were one-handed, and their shield penalties are calculated as if they were large.
Prior to 0.12, there were two additional types of handedness: 1.5-handed (which could be used with a shield but suffered larger-than-normal penalties) and double-handed (which had even worse penalties, plus cut the weapon's base damage in half).