Bear in mind the galaxy is continuously rotating, our sun is orbiting the galactic nucleus, as are the other stars around it. Right now the nearest star is 4 lightyears away, but that's not always the case and it's quite likely other stars have passed ours by much closer than that during it's lifetime. In fact our sun has orbited the galactic core many times; it does so roughly every 250 million years.
The sun would have accumulated material from the nebula it formed in as it drifted though it. The stars near us now are not the ones our sun was near when it formed though (except by extemely unlikely co-incidence), as each star is on a slightly different course round the galaxy, like water droplets in a very slowly rotating cyclone.
If another star were to pass by very close, it could be disastrous for us as it could severely disrupt the planetary orbits in our system, but that's fairly unlikely and there's no prospect of that happening for many millions of years at least. The space between stars is vast, even by comparrison to the size of stars themselves and their solar systems.
EDIT - on that last point, 4 ly is ~250,000 AU (the distance from the earth to the sun). If we asume out solar system is 100 AU across, that's still only 1/2500 the distance to the next star.