Malmo defender Albornoz, 23, put the hosts ahead after 13 minutes of the match played in the northern city of Coquimbo when he connected with a cross from Gonzalo Fierro.
Hernandez, 27, who plays for O'Higgins in Chile, marked his debut by scoring twice in four minutes early in the second half.
He doubled Chile's lead after 50 minutes and made it 3-0 in the 53rd, both times taking advantage of mistakes by Costa Rica goalkeeper Patrick Pemberton.
Carlos Munoz buried any hopes of a Costa Rica revival with the fourth 13 minutes from time.
Albornoz, whose father is Chilean, represented Sweden at youth level 38 times but never played for the senior team.
In December, he said he wanted to play for "La Roja (the reds) and Chile's Argentinian coach Jorge Sampaoli heeded his plea.
"He is a young kid and now we had the chance of knowing him better in a difficult environment for him. He played really well," Sampaoli said after the match.
Chile displayed their usual pressing game, keeping Costa Rica on the back foot for long periods and the central American side had little impact in front of goal.
Chile are tipped to do well in the World Cup despite being grouped with world champions Spain, Netherlands and Australia in the opening phase. Costa Rica, one of the outsiders are in the same first round group as three previous world champions: England, Italy and Uruguay.
Chile's next friendly is in Germany in March while Costa Rica's next warm-up games are against South Korea and Paraguay.