In the movie 1942, a Nazi sub prowls the coast of Los Angeles. Was that plausible? How did it get over here? Were there really Nazi boats/ships off the West Coast? If so, what kind of boats/ships in particular? The idea is intriguing. Many thanks in advance!
Are you sure you don't mean the movie 1941? The Spielberg one with Dan Akroyd, John Belushi, etc?
If so the answer is simple. It is NOT a German U-Boat depicted there. But an I-Boat of the Imperial Japanese Navy.
In the lead up to the attack on Pearl Harbor the IJN had sent several of these exceptionally long ranged subs to wait off Hawaii and in the sea lanes between the US West Coast and Hawaii. Hoping to catch important warships or any juicy target at the start of the war.
The results were unspectacular. Though they did manage to damage the carrier SARATOGA and force her into a lengthy repair period.
Then in early 1942 several if the subs were directed to the US West Coast. To attack targets of opportunity. This was not a high priority for subs in the IJN and their efforts were uncoordinated and generally ineffective. And due to the logistics and distances involved the offensive was short lived.
Though the panic they caused was certainly real enough. As the reaction to I-17s bombardment of the Ellwood Oil Field near LA is lampooned in the film. The sub did lob a few shells and cause modest damage before sailing for home. The local civilian population was extremely anxious and the next night did involve a lot of phantom sightings, warnings, and firing at nothing around LA.