Citation is a cure for plagiarism, which is a different, but related, problem from copyright infringement. Plagiarism is the unacknowledged use of the work of another — falsely claiming or creating the impression that you are the creator of someone else’s work. It is possible to plagiarize a work even if it is not protected by copyright; one can plagiarize from Adam Smith, who died in 1790, as easily as from Milton Friedman, who died last year. And citing the source always cures plagiarism.
Citation, however, does not cure copyright infringement, which is the unauthorized use of another’s work. If you copy an entire journal article by someone else, without permission, into a book you publish, you probably have infringed copyright, even if you add a footnote citing the original author and source. Citation may help show a good faith fair use argument, but it neither prevents plagiarism nor guarantees fair use. Copyright infringement is avoided either by having the copyright owner’s permission when using someone else’s material or by relying on one of the many exceptions to copyright.
Copyright, of course, does not protect everything. You cannot infringe a copyright when you use public domain material, especially when you take only ideas from another source but do not copy protected expression, since copyright does not protect ideas. But if you fail to acknowledge the source of those ideas, you may still be guilty of plagiarism.