Tocopilla is a small coastal city in Chile. It's in Region II de Antofagasta, between the cities of Antofagasta and Iquique on the Ruta 1. There's also a road leading land inwards called the Ruta 24 which leads to Maria Elena (a major trucker stop), Calama and eventually San Pedro de Atacama.
North towards Iquique
Stand at the crossing of the Ruta 1 and the Ruta 24, which is the last exit out of town northward. Catch a ride directly to Iquique (many people live there so it shouldn't be too hard). Mind of a Hitchhiker got dropped off here by a truck driver in early 2017 and got picked up from this spot by a large, shiny and completely empty long-distance bus by a bus driver who was just picking up hitchhikers along this route like it was the most normal thing in the world. She didn't try to flag the bus down, the driver stopped out of his own initiative.
If not directly to Iquique, try finding a ride to the Complejo Aduana El Loa, which is a domestic customs check because Iquique is a Zona Franca (tax free zone). At this complex there's food, water, bathrooms and shade and one can find a ride from here calmly. Iquique's airport is more than 40 km south of the city and that's where the real highway starts. If your driver isn't going into Iquique's center, one can get out at the toll booth on this highway and find something to the city center. Try asking for "Playa Caravancha", the city's most famous beach.
Accommodation and Sleep
Mind of a Hitchhiker freecamped somewhere between Tocopilla and Caleta Urco (that's north on the Ruta 1) in January 2016. This coast is very campable.