You have to register for the service first of all.
Then make sure that the content of where ever you are going to apply the tools meet their standards. The standards specification can be found on their help pages.
Once that is done you can make add units in Ad-sense this generates a piece of code that can be placed on your website.
Analytics you have to add the site to the control panel then add the code segment to your website.
Both of these tools have advanced configurations but this information should be more than enough for you to start off and you can learn the advance configuration etc on the way.