adding components and scripts to gameobject dynamically

hi m new to unity3D, my problem is how to add different components to gameobject like rigidbody,mesh colider, box collider and how to add scripts to same gameobject dynamically.. Actually m having 2 scripts and a gameobject, now i want to add the second script to gameobject dynamically.. please help

this should work:

gameobject.AddComponent<RigidBody>();

since this is templatized you can put whatever component you want in the <>.