Keyframe animation on curved path

how can I do a keyframe animation if I want to move an object on the “curved path”? so not only to move an object on XYZ axes but eg. the object moves around? (on the curved path not the simple straight path