If they are in the 3-hex radius of one of your cities, you can buy the land (and unlike Civ4, you'll get the resource by building an appropriate improvement there, no road is needed, so it works with islands without cities on them too). If they are too far away, the only way of getting them is founding a city there.