Friendly fire damage is damage done by a unit to units owned by the same player or those of allied players, often accidentally. There are two primary ways this can occur.
The most common friendly fire incidents are caused by accidental splash damage where some attacks will damage all units close to their target, regardless of their faction. An example of this type of friendly fire is the Siege Tanks attack while in Siege Mode. With this type of friendly fire, splash damage will hit all friendly units. Not all units that cause splash damage will cause friendly fire damage though, such as the Baneling.
The other type of friendly fire is either intentionally or accidentally target firing your own units via an attack command. With this type of attack only the targeted unit will take damage, unless the attack would generally deal friendly splash damage.
There are many methods of forcing a Terran player to inflict friendly fire on themselves, but they generally come down to the concept of putting a unit in range of one or more Siege Tanks, such that all Siege Tanks in range will shoot it and hit nearby units belonging to the Terran player.
In most major engagements, a Terran player will have Siege Tanks. An enemy Protoss or Zerg can inflict a significant amount of friendly fire to the Terran army by closing quickly with either Zealots with the Charge upgrade or Zerglings with the Metabolic Boost upgrade.
When facing an entrenched Terran, it is not always ideal to engage immediately. Another common way players force friendly fire damage is to get a single cheap unit in range of one or more Siege Tanks.
A common way for Zerg players to achieve this is via the use of Infestors. The Infestor will Burrow and move in range of some Terran units and launch Infested Terran eggs into a position to deal friendly fire when hit by Siege Tanks.
For Terran players, the Medivac is the unit of choice to force their opponent's Siege Tanks to damage their own team. This is done by unloading either a single Marine or Marauder repeatedly to draw the fire.
Finally, Protoss players can unload Zealots from a Warp Prism in a similar fashion to the way that Terrans will use their Medivacs. This is less common, due to the fact that the Warp Prism is created in the generally busy Robotics Facility and is more fragile.
Friendly Fire can be used to kill Dark Templars by purposefully target-firing friendly units that are close to them.