Everyone should be tested for HIV at least once, but you should especially be tested for HIV if you have had condomless sex, are not protected by antiretroviral prevention methods, or used a needle that was previously used by somebody else.
Antibody screening tests are the most common tests and can be done in labs or testing sites using blood or saliva. They should be used if you potentially contracted HIV 3 or more months ago.
Rapid tests are less common and less effective, but can be used if you potentially contracted HIV within the last 3 months, and can produce results rapidly. A follow up test is required.
If you are unsure on whether or not you have contracted HIV, you can perform an at home test which can be obtained through a local drugstore. Also requires a follow up test.