The truth serum is used for Candor initiation, on the Candor initiates the same age as Tris.
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. While under the serum, Four was asked questions regarding his involvement in the simulation that controlled almost all of Dauntless, resulting in mass murder of innocent people. 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. After Four, Tris was also put under the serum and she was forced to answer honestly. 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.
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.