allow you to test a hypothesis or assess whether your data is generalisable to the broader population. They determine if the data is statistically significant.
There are three factors which affect which test you use:
Whether you’re testing for a difference or a correlation (association)
The design of the investigation: independent groups (unrelated) OR repeated measures (related)
What type of data you have (nominal/ interval/ordinal)