There are various styles to accommodate the needs of different disciplines. For example the Chicago notes & bibliography style is useful for sources where the author is not known which might be the case for older literary or philosophical works.
Your professor usually decides on which style you should use, so follow their instructions. If no style has been indicated then keep in mind that each discipline will have a preferred style. Here are some examples:
Remember that citations need to be complete in order for your readers to find easily and accurately the source your have cited. Different citation styles might ask you to keep note of different elements so make sure you keep all the necessary information from each source you use. In general it is recommended that you write down the following: