How do you know when it's his/her idea not yours?

A good rule of thumb for knowing when you're citing and thus need to document whom/what you're borrowing from is: if you write something and your reader will think it's your own idea unless you say otherwise, then you are borrowing. If you don't admit it, then you are stealing! Therefore, you must document it. What does document mean? It means you must show ownership in a formal way. For guidelines on different kinds of documentation see Documenting Citation and References. If, however, you are writing down a well known fact, even if you got the fact from another author, then you do not have to cite - a fact is public property. If, however, it is an obscure fact that the author dug up - you must give them credit for it.