Provided that the train leg of the journey is booked as part of an airline ticket (so that you have a Lufthansa flight number for the leg), canceling only the leg will be treated as a ticket change. Unless you have a fully flexible ticket, they come with high fees, so most likely you will not get any money back, but rather have to pay for it.
Lufthansa also expects you to take all flights as booked (unless you change your ticket). So it may not be a good idea to skip the train leg...at least not if this is not the last leg on the ticket. Having said this, the internet forums are full of people having skipped train legs without problems. There are often no Lufthansa conductors on the train, so they would not know whether you have been on the train. Also, if they cancel the rest of your ticket because they did not "see" you onboard the train, you can state that you have been in the on-board restaurant for the journey, so that your ticket was not checked.
But there is no guarantee that this will work. Also, the latter excuse constitutes lying to the airline representative.