Beef in graffiti is described as two writers who don't get along very well. Often the writers will write over each other's tags, throwies, and pieces with their own name, which accomplishes a few things: it takes a the dissed piece out of existence, it puts the new piece in its place to ride out its own life, and most importantly, it gives a big "fuck you" to the writer who got dissed.
Beef has its place in graffiti as a means to settle disputes. Often, however, beef leads to violence and someone ends up in the hospital. If there are no further retaliation the beef could be squashed.
Beefs start in many ways. Usually a writer will break one of the unspoken rules of graffiti, and while some may argue there are no rules, there are general practices that writers normally adhere to.
One would be that you shouldn't go over someone else's work. There are some exceptions, as throwies go over tags/hollows and pieces can go over throwies, tags, and hollows. Generally if you're going over someone, you better be spending a lot more time to paint your piece than the person you're going over did.
Another would be if a writer goes over a tribute piece or a piece of a writer who died. The beef will be handled by the deceased writer's friend or crewmates.
And yet another cause of beef is going over a piece that has been running for a long time. Sometimes it'll bring writers out of retirement to diss the kid back who went over him.
All of these violations of the code are taken very seriously as it shows a huge lack of respect for the writers when you do. You have to know the area and the writers who are prominent in that area. If a toy goes over someone who is well-respected, it leads to beef, or even leads straight to a single beating and paint-robbing to teach the kid a lesson.
All of the above images are examples of beef. Sometimes writers will leave a message taunting the other person, or even to just make it clear that it was a diss, and not someone randomly tagging over it.
The PEAR/GASM beef started when a GASM piece was buffed and PEAR went over it. GASM didn't know the spot was buffed and wrote over a couple of PEAR's pieces and PEAR launched a war. In the above photos he writes "You dis a pear, you disappear" which is referring to GASM's pieces disappearing from walls, as well as a threat, while still being a clever play on words.
The last two pictures are SABER's piece, which is one of, if not the largest graffiti piece to exist, and one of the most famous pieces ever. It could literally be seen for miles. However, SABER flew to New York and went over a SANE (RIP) piece. SANE was JA's homie who passed in 1990 so JA flew to LA to do the biggest diss of all time. JA is arguably currently the most up writer in the scene right now who's been crushing hard since the mid 80's.