To travel to Libya you need a visa, there some exceptions for nationals from Jordan and Tunisia.
Visas cost around U$100 and take a week to process.
You may need an invitation/reference number depending on the embassy and the current rules.
It is possible for some nationalies to obtain a visa in using certain travel agents, which will give you permision to obtain a visa on arrival.
Foreign embassies in Libya
Libya Foreign Affairs