Also see Gold Making Guide
There are actually two different references to this action in game. There is "gold farming" and then there are "gold farmers". Both mean something similar but both are treated vastly differently by the player community.
Gold farming is the act of staying in lower level areas in order to kill and loot items or materials and then sell them on the auction house for profit. Provided the player does not impact other players around them and does not engage in RMT (Real money trading) with the proceeds, this can be quite lucrative for the player willing to put in the time and effort. Many players also run lower level instances for the same reason, as they tend to drop BoE blues and even occasional epics that can sell extremely well. Most players use this method to gather stacks of materials, such as Mageweave Cloth or ores, then sell them in bulk at a lower rate than most other players to net a quick profit. While this can irritate some players selling their wares at a higher rate, it is a great way to make money at times.
Gold farmers however are typically very different from the average player who may engage in the above action and should not be confused with regular "farmers" or "grinders". These players are typically ones who are online for long hours and do the same kind of "farming", i.e. the farming of mobs for the loot they drop. However, where they differ is that they then sell this accumulated wealth of in-game money for real-world money, which is a blatant violation of the EULA. In fact, it has gotten so bad from certain parts of the world, for whatever reason, that the term "Chinese gold farmer" is often used regardless of where said player is really from. To compound this issue, they tend to run through other players questing areas, attempt to steal mobs, herbs, ore nodes and/or "spawn points" from other players and continually harass players to chase them out of areas they like to farm. While many aspects of this behavior do not occur as frequently in WoW, such as in the case of mobs, this is still a very real irritant to both Blizzard and their player community. Gold farmers are commonly considered "greedy", and will frequently be labeled as a loot ninja, or act plain antisocial. Often they do not speak the native server language, or have only memorized a select few sentences, thus making it harder to effectively communicate with them in game.
These "players", to use the term loosely, are frequently banned from the game but completely getting rid of them is nearly impossible due to heir ability to continually buy new copies of the game and create new accounts. Fortunately, Blizzard has instituted a feature called "report spam" in their chat windows to allow the community to report them on sight when they spam advertisements in game. In fact, the issue is so widespread in MMOs now that there are more than a few sites, such as WoW Interface and Curse that offer Add-ons specifically designed to catch such whispers, filter them out from being displayed to the player, make a GM ticket and send it automatically.