Shalom u'vracha! There are a few ways to tell. Generally, Torah law is explicit and limited to it's simple explanation. Drashot, asmachtot, and the like are more inclusive in their extrapolation to include what's not explicit. Halachot l'Moshe m'Sinai are Torah laws that have no explicit source but are recognized as fact due to their historical presence since the giving of the Tradition.
"En hamikra yotze midei pshuto" means that you must take the meaning of the pasuk for it's face value unless we have a tradition from Chazal that the true intention or tradition of understanding it is different than it's pshat/simple explanation. Drashot that expound a pasuk that don't fit with it's simple explanation in the name of one Rav/Tana/Amora, is likely an asmachta.
The practice of using the mikra to derive new or old teachings developed when the tradition of Torah began to weaken over the years from the time of matan Torah. The Chachamim of each generation were forced to revert to expounding the Written Torah in order to learn or revive the original Tradition that wasn't widely practiced. What was practiced, was generally law. New questions that weren't generally practiced, had to be learned through the expounding of the Written Torah according to the tradition they had, or learned, to derive the din. So when Chazal wished to introduce a Rabbinic law, they used their methods of expounding(to a lesser, but still authoritative, extent) to source their institution from a pasuk; like that of the Written Torah. The Rishonim are a good source to test whether a drasha is an asmachta or not, even though there are disagreements.
But the basic test is examining how close the drash is to the simple explanation of the pasuk. If it's not, it's likely an asmachta; unless the tradition dates back to matan Torah.*This clarification is not binding on every drash! It's merely a general guideline to differentiate between a mekor and an asmachta."