Jail is a municipal level, prison is on a state/federal/provincial/territory level. You will not serve life in a jail, but you will in a prison, which is more for serious crimes. user5142 is correct that they are synonyms in British English use.