In Introduction to Modern Cryptography by Katz and Lindell, p. 70, they define a pseudorandom generator by:
Let $l(\cdot)$ be a polynomial and let $G$ be a deterministic poly-time alg. s.t. for any input $s \in \{0,1\}^n,$ algo $G$ outputs a string of length $l(n).$ We say $G$ is a pseudorandom generator if the following conditions hold:
(Expansion) For every $n$ we have $l(n)>n$
(Pseudorandomness) For all probabilistic poly-time distinguishers $D,$ there exists a negligible function $negl$ s.t. $$\left| P[D(r)=1] - P[D(G(s))=1] \le negl(n) \right|,$$ where $r$ is chosen unif. at random from $\{0,1\}^{l(n)}, $ the seed $s$ is chosen unif. at random from $\{0,1\}^n,$ and the probabilities are taken over the random coins used by $D$ and the choice of $r$ and $s.$
I would like to clarify how we should be thinking about the distinguisher, $D$. I understand that it is typically any polynomial-time algorithm, but how do we interpret its output? Do we assume that when $D$ "thinks" its input is truly random then it outputs a $1$, and otherwise outputs a $0$?