Get the submodule initially
$ git submodule add git://github.com/twitter/bootstrap.git lib
$ git submodule init
Time passes, submodule upstream is updated and you now want to update change to the submodule directory
$ cd submodule_dir
Checkout desired branch
$ git checkout master
Update
$ git pull
Back to your project root
$ cd ..
Now the submodules are in the state you want, so
$ git commit -am "Pulled down update to submodule_dir"
Or, if you're a quite busy person:
$ git submodule foreach git pull origin master