A pasty is usually savoury. It rhymes with neither 'nasty' (unless you're being particularly curmudgeonly ), nor 'hasty': /'pæsti:/. There is a homonym with the other vowel, but it's usually in the collocation pasty-faced.
It is basically a kind of pie with a savoury filling (usually meat, potatoes and vegetables) wrapped in pastry with a crimped edge. Originally, Cornish tin miners took their pasties to the mines as a complete meal; they would hold the crimped edge to eat the pasty without getting it (the pasty) dirty. Modern pasties are much smaller and considered more a snack.
And more than that. It was divided into a savoury and sweet. Meat and vegetables one side and jam or apple on the other. The crimped edge was not only to keep it from getting dirty but to prevent contamination and save the risk of tin poisoning.