To use licensed characters, a writer must first identify who owns the trademark or copyright and then obtain permission, says LegalZoom. To reproduce the image of a Disney cartoon character, a writer would check the Disney website to learn who owns the character, then apply for written permission. Greek gods and Titans are in the public domain, as U.S. copyright laws apply for only 70 years after the author's death.
Copyright laws vary by country, according to Wikipedia. In the United States, works published after 1978, anonymous works, or works made for hire are protected for 95 years after publication or 120 years after creation. Works published 1964-1977 are copyrighted 95 years from publication. Works published 1923-1963 are protected for 28 years if the copyright is not renewed or 95 years total. Copyrights on works created before 1923 are considered expired, except for sound recordings published before February 1972.
There are circumstances when it's legal to use licensed characters. One is called Fair Use, and it applies to professionals who refer to the character or image for movie reviews or for teaching purposes. Another legal exception is called transformative use, which requires that the user change or transform the original character so it is no longer a duplicate.