When you import multiple objects (contacts + companies) in separate files, there must be a shared identifier. You can check out these sample import files here to get a better understanding: Format import files
Without these identifiers, they will not be associated upon import.