Urban planning is the process of planning which lands in a city can be used for what purposes. Urban planners do this so as to improve the economic viability of cities and the quality of life that its residents can enjoy.
For example, my wife is an urban planner and she has been involved in everything from writing rules about what uses can be made of the shoreline in our town to the conditions under which adult entertainment (things like strip clubs) would be able to operate.
The most basic task of urban planners is to create and administer the zoning regulations of the city. Zoning is the process of determining what uses (single family housing, apartments, light industry, heavy industry, for example) can occur in which areas of the city. You would not want, for example, to have heavy industry (like a factory) in the middle of a residential neighborhood. You would want the factories to be more on the outskirts of town, preferably near to rail lines and/or highways.
Urban planning really involves a large number of different tasks. However, they can generally be summarized by saying that all of the tasks have to do with how the physical space in a city can be used so as to allow economic prosperity as well as a good quality of life for the people of the city.