A trade deficit can be a problem because it indicates a lack of markets for a country's exports, reducing the amount of capital flowing into the country from its trading partners. It also means that large amounts of currency are flowing out of the country for foreign goods, increasing the amount of currency in the hands of other nations and increasing the possibility of currency price manipulation.
In the natural course of business, trade deficits tend to even out over time. If the United States buys more from Japan than Japan buys from the United States, more dollars flow into Japan's banks. Since the easiest way to use those dollars is to buy American goods, the surplus may eventually correct itself, provided America has something Japan needs.
In some cases, the flow of dollars returns not to purchase exported goods, but to buy real estate or other resources within the United States. Some argue that this is effectively the same thing as exports. For example, Japan could purchase wood, glass and steel as commodities and ship them overseas, or a Japanese company could purchase a building in the United States made of that wood, glass and steel instead. The investments may stimulate the economy as much as exports would, although the country would still technically run a trade deficit.