If you really only have one unit, and cannot bring in extra units, then here are some ideas:
The city should be on a hill (defensive bonus).
The City might need walls. (i dont build these often unless I am certain its needed)
1 Ranged unit in the city.
If coastal, build a ranged naval unit in the city as well. with this you get 3 attacks from the city. One from defenses, one from the ranged land unit, one from the ranged naval unit. This is often enough to turn away a whole army. You can even build a naval unit when adjacent to a single lake tile I believe.
Its better to have a river or two or some mountains, or a lake tile. this will slow down the approaching units. Gives your ranged units more turns to fire on them. The AI LOVES to jump into lake tiles so you can destroy them without defense.
Leave forests adjacent to you city un-chpped if you can. this makes it harder for enemy ranged units to fire on you sometimes. Very situational but it works. Obviously chopping can help you out, but if you dont need to work those tiles right away, they can block archers/catapults. This bonus ends later on when artillery shows up, but until then its a viable defensive position.