How to get rid of constant urge to urinate frequently?

Medications. This is a very common finding. Assuming that your have a negative evaluation by your doctor for things such as blockage, infection, etc., medications are the mainstay of treatment. If this fails, and your are a male, then prostate surgery is an option.
Need urinalysis. You first need to rule out a urinary tract infection which can cause this symptom. Antibiotics should take care of it providing you have a uti. There is obviously another cause such as an overactive bladder, interstitial cystitis or bladder stone etc. If no uti. You should thus see your dr., and you may well need to consult with a urologist if your dr. Can't take care of it. Good luck.