This quote from President Franklin D. Roosevelt is from a speech that he gave in April of 1939. He was speaking to a group of leaders of other American countries. In April of 1939, WWII had not yet started, but there was serious trouble in Europe and Japan was already fighting in China. It was in this context that FDR gave the quote you mention.
The meaning of this quote is that human beings have choices in everything and their lives are not dictated by fate. Many people tend to think that they are simply unable to change various aspects of their lives. They feel that they have just had bad luck and are doomed simply endure the consequences of this bad luck. FDR is saying that this is not so. He is saying that people are doomed by that sort of a passive and negative attitude. They are “imprisoned” simply because they think they are imprisoned.
To illustrate this thought, I have heard a (probably apocryphal) story of an elephant at a circus. This huge elephant is tied up by a rope to a small pole. The elephant is not actually imprisoned by the rope and the pole because it could easily pull free. However, it thinks it is securely bound and so it does not attempt to break away. In this way, it is imprisoned only by its own mind.
FDR was saying this in the context of the problems going on in Europe at that time. He was saying that there was nothing that was going to force European countries to start a war. It was their own minds, and not outside circumstances, that was pushing them towards war (imprisoning them in the mindset that war was inevitable).