Yes, if you receive a positive test result, you should leave class or work immediately and follow the isolation instructions provided to you by University Health Services or other public health officials. If you are awaiting a test result and believe you may have COVID-19 because you have symptoms or are a close contact of someone with COVID-19, such as a roommate, you should quarantine at home until you receive your test results. If you develop symptoms while you are on campus, you should go get tested or contact UHS or your health provider and isolate yourself immediately.
If you are fully vaccinated (it has been two weeks since you received a one-shot vaccine, such as Johnson and Johnson, or since your second shot of a two-dose vaccine, such as Pfizer or Moderna), you are not required to quarantine even if you have a close contact who is positive for COVID-19. If you develop symptoms of COVID-19, however, you should isolate yourself immediately and seek a COVID-19 test.
If you are not fully vaccinated and have been exposed to COVID-19, you should quarantine yourself immediately. CDC recommendations on the duration of quarantine can be found here.