Technically speaking, it is not always incorrect to end a sentence with a preposition, although, in most cases, sentences can be rewritten to avoid a preposition at the end. The only time you absolutely should not put a preposition at the end a sentence is when there is no direct object.
Upon first glance, it may seem that some words at the end of a sentence are prepositions, when in fact they are parts of the verb. For example, a sentence ending with "put up" or "put up with" is not grammatically incorrect. In these cases, "up" and "up with" are adverbial particles.
In general, it is acceptable to end a sentence with a preposition to avoid confusion or as part of casual conversation and writing. For example, it is acceptable to write or say “Where are you from?” While it could be reworded, it would be awkward and extremely formal to say “From where are you?”
It’s a common myth that the English language contains a rule banning prepositions at the end of a sentence, although Latin does have such a rule. In a few cases, it is undesirable to end a sentence with a preposition. In the case of a very long sentence, the ending preposition could be quite a distance from its object, making the sentence confusing.
A common story regarding ending sentences with prepositions involves Winston Churchill. An editor changed a sentence he wrote so that it did not end with preposition. Churchill’s rebuttal was something like this: "This is the kind of impertinence up with which I shall not put." Sources disagree on the actual quote, but the idea remains that Churchill believed it was unnecessary to rearrange the structure of a sentence to avoid ending with a preposition.