The methods used to collect data in a Physics Education Research project will depend on the particular issues under investigation, the research design, research questions, methodology, etc, as discussed in other sections.
For example, if you were investigating the impact of using clickers/polling software to improve student engagement in your lectures on Optics, you might approach this from several angles. You would probably look at student module grades, but you might also hand out a survey questionnaire to get a measure of student opinion on how they found it. You might conduct a focus group for more in-depth insights. You might have an independent observer sit in on a lecture, with an observation rubric, and so on.
There has been much written about the development of data collection instruments for educational research, and a good starting point for anyone wishing to decide upon and design data collection instruments would be Cohen et al. (2007). Common instruments employed in educational research include observation rubrics, focus groups, interviews, questionnaires or surveys (open/semi-structured/closed), pre-post concept tests, etc.
Developing a valid and reliable instrument could be a PhD project in itself. For example, the Force Concept Inventory is a very well-known validated instument developed to test concepts of force (Hestenes et al. 1992). There are many other existing instruments available that have been subjected to extensive testing that can be used or adapted by researchers. These include the E-CLASS survey instrument designed to investigate learning and attitudes to experimental physics and the FILL instrument (Framework for Interactive Learning in Lectures). In other cases, they can be developed by the researchers for themselves, and while the findings with a new instrument may not always be generalisable, they can be very valuable in pilot studies, in design and development of curriculum materials and in action research into one’s own practice.
Data analysis will also require a variety of techniques, depending on the methods used. For quantitative research statistical analysis, not dissimilar to statistical methods used in data science, may be employed. For analysis of qualitative data, thematic analysis, discourse analysis, grounded theory approaches, and others, utilising a variety of coding approches (of qualitative data) can be ultilised. Cohen et al. (2007), Creswell (2009; 2013), Punch (2009), Miles and Huberman (1994), and Saldana (2013), are all excellent resources for learning more about approaches to quantitative and/or qualitative data analysis in social science or educational research.