Depending on the complexity of your robot model, you can go a couple of ways. For simple robot joints it’s often more practical to parent one part to another in a hierarchical chain, and use the object centers of the parts for pivot points. This doesn’t use an armature at all, so it’s easier to manage, though all motion would be FK in nature.
If using a rig, you can, as darel described, make the individual parts children of individual bones – put your armature in Pose Mode, select the part, then select the bone, and use CTRL+P (for “Parent”). In the armature linking options then presented, choose “Bone.” The benefits of using an armature are many, but keep in mind that you have to insure your parts’ joint areas line up properly with the armature’s bones.