Elasticity of Supply and Tax

I am having difficulty wrapping my head around the concept of Elasticity of Supply and Tax Incidence. Can you explain what happens to the price (and who bears the burden) when there is a perfectly elastic and perfectly inelastic Supply? Thanks