Difference between Near and Nearby

What is the difference between near and nearby?
Pretice Hall’s Grammar and Composition says they are both used as a preposition. Can we, based on some circumstances, use them as adverbs? When?

Can anybody explain or comment in detail about this querry?

Thanks a lot…
Many thanks…

Both near and nearby/near by mean ‘close (by)’, ‘at only a little distance in space or time’.

‘Near’ as an adverb can be used as follows: the shops were near at hand; the bus station was nearer than the railway station; their wedding anniversary is quite near.

‘Near’ as a preposition: bring your chair near the fire; phone me again nearer the day when you want to see me; he was near his end (approaching death).

‘Nearby’ can be used as an adjective: the nearby house was for sale, or an adverb: their friends lived nearby/near by.

Briefly, “nearby” cannot be used as a preposition, but “near” can.