Bob Arctor is a burned-out drug addict who hangs around with his junkie friends having strange rambling conversations about God and drugs and reality. Bob is also an undercover narcotics officer named Fred. Fred has been assigned to monitor a suspected drug dealer named Bob Arctor. Bob/Fred's problem is that he has abused so much Substance-D that his two identities have become completely disassociated. What starts out as a sort of drug culture Catch-22 turns into a downward spiral into paranoia and madness.
The book is ostensibly science fiction, but the only SF elements are some of the equipment the narcs use to monitor their subjects, such as blur suits and holographic cameras. The book is really a fairly realistic portrait of Southern California drug culture in the late 60's and early 70's. This is probably Dick's funniest novel and also his darkest.
In his afterword Dick says that he is not a character in the novel, he is the novel. He deserves credit for showing both sides of drug addiction, the great times he and his friends had on drugs and the horrible price they paid in sickness, madness, and early death. In all honesty, the drugs Dick did probably played a role in his amazingly inventive body of fiction, but they probably also contributed to Dick's death which cost us all the work he might have gone on to produce.