The military units in SC2 almost all have counters (i.e. Thor counters Siege Tank). There are a lot of military units, so it makes it hard to remember all the counters. Is there an easy way to remember what counters what?
There is no substitute better than practice and research. These two are the best way to learn what units are generally better than others. I will provide you this link to learn about all the units and their abilities as listing everything would create far too large of an answer.
Certain units are always better than another, to use Sconibulus' example, a marauder is great versus a stalker, but does poorly to zerglings.
Watching high level play and tournaments with good commentators will greatly expand your knowledge about gameplay and strategies as well. Again you can find a lot of information on upcoming tournaments from Team Liquid located on the far right of the menu.
You can only learn through practice, there are so many different situations that you can't just research it. You have to play and experience and discover for yourself what is good against what.
Some things to keep in mind are: Terrain, numbers, unit cost (resources as well as time), tech level of the unit, range, AOE damage, bonuses to x, (and many more)
Asking someone does x beat y, is not a good way to learn because of all these different scenarios. However if you have a replay which demonstrates the situation it's good to show it to someone and then maybe someone more experienced can help you understand what would've been a better counter in that case.
In order to learn yourself what counters what, you just have to try. Play games and lose, work out why you lost, was it because your units were countered by the enemy? If so what do you think would've been better? Next time you encounter the same situation try those units instead and see if it works.
We learn the most from losing, look through the replays of your losses to better understand what counters what and when it does (and doesnt).
You can go to Starcraft 2 official page Where you can find unit detail infomation, strong against, weak against.
For example, zergling which strong against marauder, hydralist, Stalker and weak against hellion, colossus, baneling