A quick Google shows that the quote you've posted is from the plot summary of the movie "The Departed", which adds a little more context.
Billy and Colin are suddenly in danger of being caught and exposed to
the enemy - and each must race to uncover the identity of the other
man in time to save themselves. But is either willing to turn on their
friends and comrades they've made during their long stints undercover?
In English, the idiom 'to turn on someone' means to attack or criticize someone suddenly. For example:
- I thought the strange dog was friendly, but suddenly it turned on me
and bit me.
- Bob knows a lot about lions, and he says that no matter
how well they are trained, there is always the danger that they'll
turn on you.
- He suddenly turned on me and accused me of not
supporting him when he needed it.
More loosely, it can also mean to sacrifice someone in order to achieve your goals, which fits the context here. The plot summary is stating whether Billy and Colin are willing to sacrifice the friends they've made undercover, in order to find out who the other is.