Prepositions have many meanings and therefore translate poorly between langauges. Af usually translates into of, off or by (passive). Fra is usually from. Both prepositions describe point of origin. The difference is one of point of view: Af is seen in context whereas fra is regarded out of context.
Lugten af parfume var stærk. (The smell of perfume was strong)
Lugten fra køkkenet kunne mærkes helt op til anden sal. The smell from the kitchen could be felt all the way up to the second floor.)