Hi ssenyr ,
That is possible, but it is/used to be rather an involved process.
The easiest way to do it is to use Geometry Nodes: (in a basic form, without duplicating and off-setting the curve):
Coming soon to CGCookie: a crash course in Geometry Nodes by Jonathan Lampel, where things like this will be explained in depth.
Here is one way of doing this without using GN:
https://www.youtube.com/watch?v=Cg9ZTTWaV2o
It was a bit much to try and explain it ihere in text and images, so I made a (about 10 minute long) video (not edited). You will hopefully find it useful knowledge.
Omar,
If I understand correctly, ssenyr is trying to make something like train tracks:
and the wooden blocks should stay 'rectangular' and not deform.
The Curve Modifier won't let you do that.
I showed a way to get this result in the above video, but the preferred way imho would be to use Geometry Nodes.