It depends a little on what you want to do at those locations. Do you just want a sign to look at as you drive by? Or are to hoping to instruct a train to stop there and do something?
If you just want a sign, you can search for re-nameable signs in surveyor's object tab and place a sign near the track to look at as you go by.
If you want to make a train stop there, then you'll need to put a trackmark at that location. But you'll notice that trackmarks are invisible when in a train driving session. You can still instruct a train to drive or navigate to the trackmark, but it will be invisible.
You could also make a new siding at those locations and add an interactive station or industry to the siding. An interactive station or industry could be used as target to navigate to without using a trackmark. You would rename the station or industry to contain the town's name (or any name you want). If you wish, you could put the station on the mainline and skip the siding idea.
I'd encourage you to create a completely new route / baseboard to experiment with placing signs, stations and industries and placing tracks between them. It doesn't have to be fancy, you can delete it after experimenting.