how do i capture a city in civ 5..
it is near to impossible to me though i keep on attacking a city with ranged units. waiting for melee unit to attack once health goes critical but it's health keep growing after every turn..
Which era are you in? I won't recommend trying to capture cities very early in the game via brute force.
To be able to capture a city take atleast 2 - 3 melee units, 2 ranged units and a catapult. Keep on bombarding the city with your ranged units and catapult and withdraw them and fortify them until healed when they accrue significant damage. Keep your melee unit in "fortify until healed" when not being used to try and take some of the enemy bombardment off your ranged units. Try and use your melee units to ensure that your ranged units do not get damaged, but do not be afraid to use your ranged units to protect themselves or other friendly units. Attack the city with your melee units from time to time if they are inactive and in full health and refortify them as soon as possible. Once the city is weak enough, attack with all your melee units in the same turn and take over the city. Try keeping a great general nearby for the combat bonus. Do not be afraid to withdraw if your units are weak. Make sure that the city doesn't heal more than you damage it. Take advantage of unit promotions and make sure that you don't get a tile disadvantage due attacking over a river.
It is possible to take cities with small forces and different setups, but for an inexperienced map starer, this should be a cheap but effective strategy. Once you play the game enough you should be able to think up your own strategies and create unit setups more suited to the city you are trying to capture.