To indicate motion towards a place you have to use the accusative case of the noun. Now, the accusative form of the noun will depend on the gender of the noun. The accusative declension in the case of masculine inanimate nouns is the same as the nominative. But the accusative declension for the feminine nouns ending in "a" is "у".
Город (city) is a masculine noun, so the accusative is the same as the nominative.
В город = to the city.
В Санкт-Петербург = to Saint Petersburg (Saint Petersburg is also masculine).
Страна (country) is a feminine noun, the accusative is formed by removing the "a" and adding a "у".
В страну = to the country.
В Москву = to Moscow. (Moscow is also feminine "Москва")
I hope this answers your question.