There may be differences from one country to another, because lots of countries have both states and territories, but in general, here's the scoop.
States have a constitutional right to convene a state parliament and pass certain laws.
If any land governed by federal government is not in a state, usually it is said to be in a territory.
In many countries, territories do not have the right to convene their own government or pass laws as the states do; the federal government makes the laws for the territories.
How they are alike, again, would depend on what country is being looked at.