As a verb:
* "The party lasted for hours." (past tense of "last")
As an adjective:
* "The lasted milk is in the back of the fridge." (past participle of "last")
To determine the part of speech, you need to look at how the word is being used in the sentence.