You don't. You will never know if its anxiety or if its real because so many illnesses have the same symptoms as anxiety produced conditions. There is limit as to the symptoms the human body produces so even many real illnesses have the same symptoms.
The only thing you can guide yourself by is:
1. Do you have chronic anxiety? If the answer is yes, then you can not discount it and the effects it has in your physical body.
2. The risk or odds that this could possibly be the illness your scared of. If your 23 and scared you have dementia then as you can see, the odds are likely that you don't.
3. Ambiguous, ever-changing, symptoms that come and go or sometimes are worse than at other times or even disappear under certain conditions are usually anxiety based.
4. Mild, generic, symptoms, like constipation, a headache, all over body aches, no appetite, these kind of symptoms scream out anxiety.
5. Symptoms that persist, even after being seen by a doctor and told you have nothing are most likely obsession/anxiety driven. This is especially true for people that purposely seek out symptoms to match the illness they are fixated on currently.
6. Symptoms felt by the other 99% of anxiety sufferers, like palpitations, globus, difficulty taking in a deep breath, feelings of passing out, dizziness, usually mean anxiety.
7. And the best and most tried and true way to tell if its anxiety or not is: if you haven't dropped dead yet, its anxiety. Real illnesses do not just linger around indefinitely. If those heart palps are being caused by a heart condition, you would have died by now. Real heart attacks don't just keep you walking around like nothing's happening. Believe me, you will drop and the EMT's will tell you your having a heart attack. Your not going to be checked out at the ER and released. If that headache is a real brain tumor, you will know it. Brain tumors do not allow people to just walk around like its nobodies business. You will deteriorate and you will be told your checking out if that's the prognosis.
So trust me, if its not anxiety, you will find out. Real illnesses get worse and quickly. They won't let you whine indefinitely about them.