The OWL program at Purdue has some excellent instructional guides, among them this guide to APA explaining and showing examples for formating a research paper and citation styles.
Whether or not you can use ChatGPT for an assignment is up to the professor, but if you are able to use it, you need to cite it properly. This article from the APA Style Blog shows you just how to do that.