Hi,
Welcome to healthcare magic!
It can be due to bleeding from upper gut when stool will look black tarry can be caused by peptic ulcers,
or from
rectum itself when it will be stark fresh red, which can be caused by hemorrhoids-the piles, fissure, or adenomas and rarely cancers.
You need a physical examination by your physician including per-
rectal examination and get base line investigations like Complete Blood Counts, Renal Function Test,
Liver Function Test, INR.
If the cause not found with these then you may need upper and lower Gut endoscopies.
And lastly I would like toadd that your irregular dietary pattern,
smoking and alcohol intake all can lead to gastropathy and bleed so please take corrective steps on them.
This work up is expected to detect the underlying problem so a definite treatment could be started.
I hope this advise would be helpful for you.
Still if you have any queries or doubts, please write me back,
I would be happy to solve them.
Wish you a great health!