There is an Amtrak station at the Lodi Transportation Station in Downtown Lodi. Only 4 Amtrak trains pass through Lodi every day and they originate from Sacramento or Bakersfield.
Greyhound also has a station at the Lodi Transportation Station.
A car is the preferred way to get around Lodi but the city does have public transit available. Lodi Grapeline is the transit agency for the City of Lodi. It has 5 fixed routes that provide service to virtually all parts of Lodi and provides a Dial-A-Ride service for direct trips in the Lodi area. Its terminal is at the Lodi Transportation Station.
There is a hit song about this problem, Creedence Clearwater Revival's ("Oh Lord, Stuck in") Lodi. As with most places in California, you will find it hard to get in or out without a private automobile.