According to the Oxford English Dictionary, plagiarism is:
"plagiarism, n.". OED Online. 2024. Oxford University Press. 18 November 2024.
So, in a nutshell, taking credit for someone else's work, intentionally or unintentionally, constitutes plagiarism.
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.