As RobCurr states, simplest way to do this is to make sure the landscape mesh "matches" the track tile size, so that you don't get tracks that jutt above a hill or go through a suddenly ending slope.
What you can do in Unity is make a script that tells you the point on the landscape where the mouse cursors "is". I say "is" because obviouslly a 2d moving mouse cursor doesn't really intersect a 3d landscape. What you actually wanna do is create a ray cast from the camera, through the cursor and onto the landscape, and use the point where that ray goes through the landscape as the point where the mouse cursor "is" on the landscape.
Look up Raycast and this post here
Then you need to script up the behaviour of the track tile when the user drags his mouse "across" the landscape: how the track tile needs to be rotated, should it be straight or curved (if the player changes direction after already laying down some tracks), etc. Make sure you have a good grasp of prefabs and how to instantiate them for this part.