There’s this adapter you can buy when you want to plug a 3-prong power cable into a 2-prong outlet. This type of 3-prong adaptor is often called a cheater plug, and are commonly available at stores everywhere. When I used to work on-site, I would see them used in older (pre-1970’s) houses.
If you ever have need of this device, I want to urge you: do not use it with any computer or other expensive technology device. A cheater plug is intended as a temporary workaround. Using a cheater plug to get your computer connected is not a long-term solution!
2-prong outlets are not grounded, and are therefore more susceptible to power surges. Some electricians even suggest they are fire hazards, if overloaded. Plugging into your computer to a 2-prong outlet, even using a surge protector, is still a big risk I would not want you to take. Compare it to gearing up with full body armor for a motorcycle ride, but leaving your helmet behind.
The true solution, if you have a building with 2-prong outlets, is to have a licensed electrician upgrade things to grounded, 3-prong outlets. If you don’t own your house, try to convince your landlord to make this change. Tell them it’s a big safety issue.