In many countries yes, in others absolutely not, and knowing which type you are in before arrival saves real pain. Where extensions exist, the usual pattern is applying to the immigration department before your current stay expires, with your passport, a form, a fee, proof of funds, onward plans, and a plausible reason like continued tourism or a medical situation. Some countries extend routinely; others grant only exceptional extensions for emergencies; some require you to exit and re-enter instead, though border runs are increasingly restricted.
Two rules matter everywhere: apply before your current permission expires, never after, since even a short overstay converts you from applicant to violator; and start early, because appointments and processing can consume weeks. Keep proof that you applied, as some countries let you stay legally while a timely application is pending.
Check the official immigration website for whether extensions are possible on your visa type, the deadline, and the documents, and treat visa agents' promises with healthy scepticism.