Cherry picking is not a logical fallacy per say, but I’ve chosen to handle it as one as it is very common in debates and other forms of discourse. The core of the fallacy is misrepresentation of an opponents position. Thus it is related to the straw man fallacy. The core difference lies in that while straw manning is a straight misrepresentation of what was said, cherry picking often quotes verbatim, but out of context.
One example that comes to mind as often being cherry picked is a Marx quote, where he refers to religion as the opiate of the people. Out of context, it appears that Marx’s perception and opinion on religion is that it is a drug.
The entirety of the quote goes:
Religious suffering is, at one and the same time, the expression of real suffering and a protest against real suffering. Religion is the sigh of the oppressed creature, the heart of a heartless world, and the soul of soulless conditions. It is the opium of the people.
The abolition of religion as the illusory happiness of the people is the demand for their real happiness. To call on them to give up their illusions about their condition is to call on them to give up a condition that requires illusions. The criticism of religion is, therefore, in embryo, the criticism of that vale of tears of which religion is the halo. Karl Marx. 
In context, it would appear that Marx’s criticism is not of religion, but of society and the world being in a state wherein religion is required to act as medicine. This is also why I tend to encourage people to read as close as possible to the original source.
Just like the previous straw man fallacy, accusations of cherry picking are often used as red herrings in debate. If you wonder if someone is guilty of cherry picking, ask the following question: “Is the quote a correct representation of the quoted person’s position on the topic”
As with the straw man fallacy, most people respond to being either accused of being a cherry picker, or when being cherry picked with trying to defend themselves with logic, reasoned argument, and acceptable rhetoric. However, this is draws attention away from the argument that was being made, and thus allows the person who is trying to manipulate you to “win”. My recommended approach to being cherry picked is to ignore it if possible and continue your argument as if it did not happen, an other option can be the “agree and amplify” technique.