It is illegal to copy and paste works of other people, but if you craft a unique essay by using and properly citing someone else's ideas, that is totally fine, and you can do it.