The most straightforward thing is to use white vinegar in the final rinse cycle of your dishwasher or pour it directly into a container inside the machine. Those spots are mineral deposits, mainly calcium and magnesium, that stick around when the water evaporates. Your friend is right about water hardness: it means your water has a lot of dissolved minerals in it, which is super common in most places. It's not bad for your health, but it does leave that sticky stuff on glass and steel.
Vinegar works because it's acidic and dissolves those minerals without you having to spend money on expensive equipment. Try first by filling a cup with white vinegar and putting it on the top rack of your dishwasher during a normal cycle with no dishes, or if you want something less strong, pour half a cup into the rinse aid compartment. You can also manually clean the glasses with a cloth soaked in vinegar after washing them if you want faster results in the meantime.
Another cheap option is to use lemon or citric acid that they sell in small packets - they work just as well as vinegar. If you eventually decide to invest in something more permanent, water descalers don't always need to be complicated installations: there are relatively affordable filter cartridges for your faucet or small systems that connect easily. But honestly, vinegar solves the problem for a fraction of the cost.