Risk is based on how close you were to an infected person for how long. Distance is estimated from the strength of the Bluetooth signal that your phone detected coming from their phone. The closer the phones, and the fewer the barriers between them, the stronger the signal detected. Having a phone in a bag or back pocket can cause your phone to overestimate distance and so underestimate risk. The closer you are to an infected person, the higher the risk.
Risk is also based on how Infectious the person was on the day you were in contact, i.e. how much virus they were likely shedding. The most dangerous period is around the time that symptoms begin, and includes days before the infected person has any symptoms at all.
There are other risk factors that the app cannot measure, including whether either of you were wearing a mask, were singing/yelling vs. not talking at all, or were indoors vs. outdoors.
The Google/Apple system combines all contacts you had with one or more infected people, from midnight to midnight in Coordinated Universal Time (UTC). This is why My Exposure Summary in your app might show exposures that don’t quite line up with calendar dates in your local timezone.
Based on your risk, you will be given actionable information for next steps. For example, low-risk actionable information may recommend that you “monitor your symptoms for the next 14 days and call this public health number 555-555-5555 for a free test if you develop any symptoms”. High-risk actionable information may recommend that you “quarantine away from your family/roommates for 14 days and get tested around day 7”. What the thresholds are for low risk and high risk, and what information you are given, will depend on which region you are in - these are set by your local public health authority.