What does it mean "life imprisonment"?

When is a perpetrator sentenced to life imprisonment? And does the perpetrator then really "life", ie the rest of his life, in custody?