Harish, when you make an offer that's accepted, your agent will open an escrow account for you at a Title company. The Title company will act as a neutral thrid party to handle things like pro-rated items (such as property taxes). The Title company will calculate the taxes owed by the previous owner up to the date that the escrow closes. They will also give you an accounting of what you will, or do, owe the City for property taxes based on the day that you close escrow.
Hope this helps.