Years ago I went to CostaRica, I found this and brought it home. I have no clue what this skull may be, found it on the shoreline washed up. Not sure if it's an alligator-snake- or maybe some kind of shark. After seven years of pondering, I think it's time I found an answer.
I think Claire is right. It seams to be the upper jaw of a wild boar.
It's a bit big to be an alligator. The boar probably was looking for food along the shoreline when it died either of old age or some kind of illness. Scavengers most likely then ate the carcass and the rest of the bones were either washed away by a tide or buried in the sand.
This is the top of the skull of a bony fish; coming from Costa Rica and given its size and shape I would think a Cat Fish is good bet, probably of the Ariidae variety. Incidentally if you look at the bottom photograph and rotate it 90 degrees to the right it appears to show a picture of Christ on the cross.