You see this in a lot of movies and such but how do you do it?
I never found a tutorial in that subject.
lets say I want someone to hold a sword or any other kind of object or weapon that is a 3d object.
or another example I want that someone would have instead of an arm, to lets say have a robotic arm but only from the elbow.
any idea? even a link to some information could be helpful,
Look up the terms "3D matchmoving" and "rotomation".
To have a 3D object in a shot is one thing, but interaction with it brings a lot more complications. You'd need to put multiple tracking points on the characters hand, then match-move the shot (I'm unsure if you'd need two passes, one track for the camera movement and one track for the hand movement? I've not attempted this but think some people try and stablize the shot first, if possible if it's simple camera shake for example, track the hand, do the work, then reintroduce the camera shake afterwards), and then any part of the hand that's between the camera and the 3D object would need to be rotoscoped (like tracing out a copy of the part of the hand) and placed back over the top of the object. You'd also need to match the lighting/shading on your object with the environment, also create any occlusion/shadows due to the interaction with it and match the motion blur and film grain.