It's important to cite one's work for a variety of reasons beyond that your professor requires it.
Citing your sources:
Know the Citation Style
Citation styles are sets of guidelines for formatting works and for citing sources. Most use the same information plugged into different spots.
Different fields, disciplines, and courses use different citation styles. Common citation styles are APA, MLA, and Chicago but others exist. The citation style is usually found in a course syllabus or an assignment description. If you can't find it, ask your professor.
Use a Style Guide
Most citation styles have a guide (either a book or a website) that describes how to use it and often provides templates for writing citations. Purdue OWL is one online source for commonly used citation styles.
Citation Generators
Most databases and search engines have some kind of citation generator. These aren't bad, but they frequently have errors. Use them with caution and learn how to write citations yourself to identify the errors more quickly.