If you have a doubt you might have cancer, you should visit a doctor immediately, since the prognosis of most cancers depends on how fast you detect it and start treatment for it. Remember cancer nodules are non painful, fixed (they will not move when palpated) and hard to the touch. The big problem with cancer is that is doesn't hurt until is too late and the pain is not from the tumor itself but from the tissues the tumor is compressing.
how you know is by diagnosis from a doctor.if you have what you feel like may be symptoms of cancer you need to talk to your doctor.the symptoms aren't universally the same. they can vary from person to person and according to the kind of cancer. please see the doctor asap.