Juxtaposition is the placing together of two elements that are opposite. JFK did this a few different ways in his inaugural speech, which is probably one of the more famous inaugural speeches ever given.
First, in a few places, he used contrasting words to good effect, saying, for example,
Let every nation know, whether it wishes us well or ill, that we shall pay any price, bear any burden, meet any hardship, support any friend, oppose any foe, in order to assure the survival and the success of liberty (para.5).
In this example, the juxtaposition is "whether it wishes us well or ill," two contrasting ways that other countries might regard us. There are a few others like this in the speech, too.
Second, he uses contrasting ideas in juxtaposition, for example, in this line:
For man holds in his mortal hands the power to abolish all forms of human poverty and all forms of human life (para. 2).
He is saying man has the capability of solving the problem of poverty, while on the other hand, man has the power to destroy all of mankind with his weaponry. This is a powerful contrast, the power of man to do good or evil.
Finally, juxtaposition is used as a kind of play on words, with a reversal of word order to contrast two very different ideas, all maintaining a strong rhythm and flow that unifies the opposite elements of the sentence. This is the most famous example from the speech:
And so, my fellow Americans: ask not what your country can do for you—ask what you can do for your country (para. 25).
Notice how a reversal of word order provides a very sharp contrast between these ideas, imploring us to not ask for help from our country, but to offer our country our help.
There are many forms of juxtaposition, and this speech shows how skillfully it can be used.