In standard democracy one has various "duties and discretions" in relation to the state he was born to even though he did not signed any agreement with the state - nor was he asked whether he agrees or not.
Note that this notion is not limited to "standard democracies"; it is ubiquitous across all states, historically and geographically.
On the other hand there are hypothesised systems of government (example: Starship Troopers) where one has to enter a contract with the state to become a citizen with duties and discretions.
I have not read the book in question, but this seems like a peculiar idea-- how would one deal with children, who do not have the capacity to enter into a contract? And, presuming that one signs such a contract on one's 18th birthday, what happens to those who refuse to sign, or wish to negotiate a different contract? And, since the power differential between the state and the individual is so immense, to what extent could one argue that the contract was not coerced?
What is the philosophy behind this idea? What is it called? Where can I learn more about it?
Well, the core idea is known as the social contract, and the canonical source is Rousseau-- but you will note there that the contract is implicit, not explicit, and that one tacitly joins into the social contract at birth.