Close and near can be used as adjectives and in many cases they are the same when talking about physical distances.
The train station is close - CORRECT
The train station is near - CORRECT
They are not the same when talking about more abstract concepts, like relationships.
My mother is close - She is 3 feet away
My mother and I are very close - We have a strong family bond
My mother is near - She is 3 feet away
My mother and I are very near - We are 3 feet apart
Only near can be used as a preposition without the word to.
We are close the train station - NOT CORRECT
We are close to the train station - CORRECT. *close to* is the proposition
We are near the train station - CORRECT. *near* is the preposition
When you convert to adjective form, they are not interchangeable at all. In this case, closely implies "at a small distance", while nearly implies "almost but not quite"
We are closely following the news - CORRECT
We are nearly following the news - NOT CORRECT
We closely hurt myself - NOT CORRECT
We nearly hurt myself- CORRECT