A MAP, MAF and AFM are all used to measure the amount of air in the engine. However they do it by different methods.
A MAP (Manifold Absolute Pressure) sensor measures the vacuum or boost, in a turbo or supercharged application. The amount of air is then calculated using the volumetric efficiency of the engine and temperature of the air. In reality it is a referred to a table in the ECU program. The MAP sensor allows you to calculate the mass of air and from that you can determine the mass of fuel you need to inject. Older fuel injected cars tend to use MAP.
A MAF (Mass Air Flow) or AFM (Air Flow Meter) measure the mass or volume of air. These work in various ways including measuring the cooling effect of the air as it passes a heated element, vortex shedding. Older methods include a vane which is pushed by the air flow. There is usually some compensation for temperature. As you basically measuring the mass of air it is more direct measurement and you can easily calculate the mass of fuel required. Most if not all new cars run MAF/AFM.
Can you swap them?
Not with your standard ECU. Aftermarket ECUs may be able to use either.
Which is better?
Most high horsepower guys seem to like MAP as it eliminates a restriction in the intake path. You can also exceed the range of a MAF/AFM in big horsepower application both at the top end or at idle. From an engineer's point of view I think that the MAF/AFM is a more precise method. From an emissions and efficiency point of view a MAF/AFM is normally the better approach.
MAF/AFM Tubes
Some people sell larger diameter intakes which you transfer your MAF/AFM to. The change in tube diameter actually changes the calibration of the MAF/AFM. Basically it can make you car run leaner which under full throttle applications may improve horsepower at the risk of engine damage.
MAP to MAF Converters
These are also available which allow you to run a MAP sensor in place of your MAF/AFM sensor.
(Disclaimer: Just my 2.54cents worth)