Medical accidents could occur. If infected blood is contained on a syringe and then injected by accident in someone's veins, there can be infection. But as you can imagine, this is not the same as getting prickled by a needle left under environmental influence.
The ways HIV is spread have already been exposed to you previously. There is also a really nice FAQ posted by Curfew on the top of this page.
All the best.
Bo1234, you seem very anxious and really need to talk to a doctor about that. Being 'stuck' by a needle is different than using the plunger to inject yourself. That's the difference. Air inactivates the virus so a needle stuck into you would not expose you to HIV. Injecting yourself is different. And that did NOT Happen to you.