For example if you got an x-ray mod if your friends don't have that mod will they be able to join in general to play lan in that world?
Client modifications are optional. If you're using x-ray or other client-side
cheats mods your friends don't have to use them. They're completely free to pick their own mods. Even if you don't use x-ray they still could use it (or other mods).
If you want to play on modded server or LAN game requiring certain mods you'll all have to install them. What exactly you need depends on the mod you want to use. Since we don't know what you're up to we can't help you there. The best approach is to read the instructions in the readme file which usually comes with the downloaded archive.
For servers, it depends on the type of mod. There are 2 types of mods client-side, and server-side, if a mod is client side it can only change the players perception of the world via things like shaders, depth to leaves, or xray. Server side requires both the player and the servers to have the mods, this is for things like build craft, or bibilo craft. As far as I am aware lan works by hosting the world as a local server, and if that is true they should be fine to join without it.