There's no difference in meaning when they're used as verbs, but "purchase" is more formal. You'll hear "purchase" more often in the business world and "buy" more often in everyday life.
As nouns, a "purchase" describes the transaction when something is bought and "buy" means a "bargain" or a "good deal."