Someone tells me that this is possible but how?

Person A has unlimited data allowance (3g) on his smartphone

Person B doesnt have any data allowance .

I was told that B can use A's data allowance . (when there near each other)

Is this possible ? only thing i can think is a blue tooth connection. or some how A's phone sends wifi signals.