The difference is that an adjective placed before a noun acts as an attribute and after a noun it acts as a modifier.
There are some rules as to the position of the adjective, as follows:
Demonstrative, posessive and indefinite adjectives and articles go before the noun. E.g., Mis tres amigas vienen a la fiesta or Este nivel de español es intermedio.
Superlative or diminutive adjectives go before the noun. E.g., ¿Cuál es el mejor libro que has leído?, La peor película que he visto or Es la mejor manzana que he probado.
To express emphasis, you place the "measuring" adjective before the noun, e.g., La hermosa niña de ojos azules or El asqueroso perro de mi vecino.
If you use two or more adjectives that refer to the same noun they are placed after the noun. Examples: La mujer guapa e inteligente, La casa es grande y bonita.
In certain cases a change in the position of the adjective alters its meaning, as in your example. Another example is El señor pobre vs El pobre señor. In this example El señor pobre means the man has no money. El pobre señor means that the man is in a bad situation with troubles not necessarily related to money.
Some adjectives maintain a fixed position in the sentence: Rara vez, Alta tensión, Un verdadero caos.
There are different types of adjectives; between these we can distinguish the specificative and the explicative adjectives.
Specificative: those that besides of giving a quality, restrict the semantical extension of the noun. They are usually afterwards. Examples: Los ojos azules, El auto violeta (Not verde, not rojo. Violeta!) They are adjectives of relationship, for instance a nationality or a quality that can't be changed. Él es un señor Africano, Él es un hombre blanco, Un nadador colombiano.
Explicative: They don't limit the extension of the noun, but distinguish or attribute a quality of the noun. They are usually before: La verde hoja, La blanca nieve, La esbelta figura
And here is further specific and deeper reading about concordance in general. That is a complex subject in Spanish grammar. But very relevant to the usage of adjectives as there are very special cases of concordance.