It has been mentioned by Christina that when she was growing up in Candor, they gave her the truth serum which forced her to share all of her deepest secrets in front of the entire faction.
The truth serum is used for Candor initiation on the Candor initiates. They belive that the truth is more important than someone's feelings.
In Insurgent, the Truth Serum was visibly used for the first time on Four and eventually on Tris upon arriving in Candor for the first time. Jack Kang, Candor's leader, ordered the two be arrested and interrogated for allegedly committing crimes against humanity after seeing Four running the Attack Simulation and seeing Tris supposed help him. Jack ordered to two to be interrogated in front of the entire Candor population.
Their interrogator was a Candor man named Niles. He injected a needle containing the truth serum into Four's neck. They asked him for his name, in which he said "Four." Due to that not being his real name, they asked for his real name, in which he eventually said Tobias Eaton (though after a lot of resistance against the serum). After realizing that Four is the son of Marcus Eaton, they asked him if the rumors about his father's abuse was true. Four tried his best to resist the serum, but in the end, he eventually confirmed the rumors when Niles asked him why he switched to Dauntless and Four responded with, "Because I wanted to escape my father." Afterwards, Four was asked a few questions regarding his involvement in the simulation that controlled almost all of Dauntless, resulting in mass murder of innocent people, including majority of the Abnegation leaders and a few others. He answered truthfully, forced by the simulating effect of the serum. The Candor acquitted him of his crimes upon finding out Four's situation regarding his loss of control under Erudite's simulation, however after that, Niles asked him what was his deepest regret, since that is what the Candor do to accept anyone in their society. Four then responded saying that he was planning on becoming factionless because he switched to Dauntless out of cowardice. However, he continued to stay because of Tris. At the end of his interrogation, all the Candor started to whisper: "Thank you for your honesty."
After Four, Tris was next to be interrogated. However, instead of Niles plunging the serum into her neck, she wanted to do it herself. Her reasoning behind it was because it gave her a sense of control. Niles asked for her name to which she responded with "Beatrice Prior." Eventually, Niles started questions her about what her role was related to the attack simulation. She was acquitted as well when they found out that she was in the Dauntless control room only to try to stop Four and the simulation itself. However, by the end of it, she was forced to tell everyone that she was the one her killed Will when Niles asked her what her greatest regret and biggest secret was. At the end of Tris' interrogation, the Candor said the same thing as they said to Four, "Thank you for your honesty."
It is presumed that Eric was under the serum during his capture and interrogation by Candor.
Ezekiel Pedrad was also put under the serum, but only to test where his loyalties lie.
In The Divergent Series: Insurgent, attempting to resist the effects of the serum is very painful, as shown when Tris is injected with it and subsequently clenches her teeth in agony until she finally lets the truth—she killed Will—out.
The Truth Serum, as its name suggests, puts the person administered with it under a lethargic effect that makes them willingly answer questions without much struggle. Upon being administered the serum, Tris forgot why she was being asked questions, adding to the powerful effects of the serum.
It is said by Christina that no one is able successfully deny answering any question while under the Truth Serum. However, due to the special nature of the Divergent, Tris was able to keep the answer from leaving her when under the serum. It can be concluded that those who are Divergent are able to, with enough effort, resist the effects of the Truth Serum.
Not many Divergents or Genetically Pures are seen completely resisting truth serum to the point where it doesn’t work at all (Nita when about to inject David), only Tris in recent memory (said by Matthew). But Tris can still feel the weighing effects of the Truth Serum.