Curve Modifier for Arbitrary Bezier curve

I have an arbitrary Bezier curve in space. It is not aligned with any axis, nor is it at the center. I am looking for an example or explanation of how to apply this curve modifier to a cylinder. My questions is:

How do i locate the cylinder relative to the curve? It seems that once the modifier is applied the deformed cylinder does not lie on or even close to the curve. I have tried making the origins of the curve and the cylinder the same to no avail. There must be some logic to how this modifier works, but all the examples i have seen have the curve at 0,0,0 and the curve lying in one of the planes.

Just watched this yesterday: https://www.youtube.com/watch?v=ImNtC2mbPZ0
Start at 22:20
Maybe this will help.