When we say planta in this context we refer to the "level", i.e. ground floor, first floor, second floor,...This would be in Spanish: "la planta baja", "la primera planta", "la segunda planta",...
When we say piso we refer to the "flat". For example:
If you say this, this generally implies that on each floor there is only one flat, so it'd be the same as saying that you live on the second floor or the flat which is on the second floor.
This is how we use the word piso in Spain. Bear in mind that in Latin America the word piso can also mean "the floor of your house", for example: "Necesito barrer el piso" (I need to sweep the floor.)
Saludos
Inma