A Griefer is a person on a multiplayer server who intentionally tries to bother other players by destroying buildings/spawn points, stealing, flooding high-traffic locations with water or lava, and generally breaking the server rules.
Stopping a Griefer
Griefers want one thing, and that is to get a reaction from you. As such, asking/begging them to stop or yelling at them will likely only encourage them to continue. By acknowledging what they are doing, you give them what they want. Act like they are not there and they will get bored and leave.
As a preventative measure against Griefers, it is a good idea to use a server which allows you to disallow the destruction of blocks in certain parts of the map, as well as auto-kicking users who are hacking or using large amounts of Explosives.
A recommended preemptive defense is to booby trap areas of importance, depending on if you are skilled with wiring.
If you disconnect when you see a man has joined the world and you don’t know him could stop the potential threat of being grieved.
Also when playing multiplayer you can go to a new world and start building a multiplayer server. While doing this try not to put any valuable items in chest and build standard basic homes. That way people are less likely to grief you and if they do, no valuable items are wasted.
If you play on the Xbox you can quit terraria when a griever is caught grieving. That way you disconnected the server without saving any of the items or changes you did since last auto save.