Tacking is a term that was popularized by Nimzovich. He described it as playing against an enemy weakness, such as a weak Pawn, where it is attacked in two ways which forces the opponent to place his pieces in an unfavorable position. Then the weakness can be exploited.
In Chess: An Encyclopedic Dictionary the following definition is given: Tacking is a strategic device which involves maneuvering the pieces with the aim of creating and utilizing weaknesses in the opponent's camp.
Writing in Modern Chess Strategy Ludek Pachman thought the definition should include every positional maneuver in which the enemy position is alternately subjected to various tactical threats.
Whatever definition you choose, we most often see tacking employed where, for example, one side attacks on the K-side and forces his opponent's pieces into unfavorable positions and then decides the game in a breakthrough in the center or on the Q-side.
Nimzovich's My System was originally a series of five brochures from 1925 to 1927. The book itself was first published by G. Bell and Sons, Ltd. in 1929, but the term tacking was in use before that. For example, in a game from the 1908 British Championship Gunsberg described white's strategy as tacking in one game I saw, so the term actually pre-dates Nimzovich.
Even though the following game has been used as an example of the tacking maneuver, like many pre-engine game annotations, there is a fly in the ointment. White really didn't need to resort to it because he could have continued his direct K-side attack, but it would have involved calculating some heavy tactics that the pre-engine masters simply missed. But, the point is that the game illustrates an IDEA that we need to be aware of.