Ray of Frost is a cantrip that takes 1 action and has a range of 60’ feet, so it is a viable spell. You basically need to make a Ranged Touch Attack, which is 1d20+1, and equal or better the boar’s AC. In this case, that’s 11. If the spell is successful, the spell takes effect and we’ll need a follow-up damage roll of 1d8 Cold Damage.