Basically, there is only one way to avoid plagiarism—give credit where credit is due. this means citing a source whenever you use information that is not your own unless it is common knowledge.
If you come up with an idea on your own, you don't have to give credit to anyone (except yourself). Also, if you are writing about something that is common knowledge, you don’t have to give a citation for your source.
Common knowledge, by the way, is information you and your reader are likely to know without referring to some other source. It can vary from subject to subject.
Original source: Purdue OWL: Quoting, Paraphrasing, and Summarizing.