../folder1/folder2/xxx.sol: these paths are interpreted relative to the location of the current file, . as the current directory, and .. as the parent directory.
In the solidity path, it is possible to specify path prefix remappings. As an example, if you want to import github.com/ethereum/dapp-bin/library, you can first clone the GitHub library to /usr/local/dapp-bin/library, and then run the compiler command, shown as follows:
solc github.com/ethereum/dapp-bin/library=/usr/local/dapp-bin/library
Then, in our solidity file, you can use the following import statement. It will remap to /usr/local/dapp-bin/library/stringUtils.sol:
import "github.com/ethereum/dapp-bin/library/stringUtils.sol " as stringUtils;
The compiler will read the files from there.