You can look at this question from two levels: legal and writing.
From a writing perspective, in fiction there are no rules about how you have to cite other works.
If you write an academic journal article, you will have to follow a style guide on how to denote citations (e.g. put cited text in quotations marks) and in what format the source has to be given. In fiction, there are no such rules. You can do this however you want. If you like, you can write your whole novel in sentences cited from other works without acknowledging this even once.
In fiction you show how people behave in (something like) real life, and therefore citations in fiction are handled like citations in life. If you sing a song in real life, you don't usually add that this was a citation from a song and say who composed it. You just sing it, and others will recognize it or not, and if they don't and want to know the title, they ask. Do the same in fiction. If you have a character singing a verse from a song, then only mention the title of the song or the original singer or composer, if the characters talk about this. If they don't, don't mention it (in text) either. You can, if you want to, explain all your sources in an appendix, but (from the perspective of writing a story) you don't have to.
Legally, you may be required to acknowledge your use of copyrighted material and even ask for permission.1 Usually, if the citations are brief and fall under fair use, you don't have to ask for permission, but it is still good practice to list the works and their respective copyright holders on your book's copyright page.2
If the works you cite from have been released into the public domain or if the copyright has expired, you can do what you want with the text. Other licenses, such as Creative Commons or GPL, will explain what you need to do.
1 The legal situation may be different in different countries.
2 We are not lawyers on this site. You may want to consult a lawyer when you are unsure about legal issues. As @celtschk has pointed out in a comment below, be especially careful if you want to cite song lyrics or poems.