When looking for data to use in your research, you can look in the many data repositories that are available online. These repositories will specify how you can access and use the data found. Some are discipline-specific, while others are more general. See below for a selected list of repositories.
Image by Marina Noordegraaf; CC BY-NC-SA 2.0
In addition to properly citing data in order to give someone credit for his or her work, there are other things to consider to make sure you are using data ethically:
You must cite any data sets you use, just like you'd cite a journal article or book. There is not one set way to cite data, but there are guidelines you can follow. Be sure to note whether or not data are accessible from your source when citing, and if so, indicate where the data can be located (this will help you increase the transparency and reproducibility of your analysis!).
Follow a specific citation style (MLA, APA, etc):
Follow recommendations from the repository the data came from:
An in-depth look at data citation can be found here.
Note that many data repositories have recommended citation formats in the dataset record. If you need further assistance, you can always ask a librarian.