Hi you can choose to travel by bus or train.
This is what i did in Gokarna last month. Day 1 - you can check-in in the shacks on the Kudle beach and get into the water or just sit on the shack and look at the beach and the people walking around with fantastic relaxing music played in the background. You can kick back and have drinks, chill with your friends with the majestic view of the beach and roaring sound of waves on the side. At night you can light a campfire on the beach and play some music and get lost under the star lit sky with your close ones. Day 2 - in the morning you can visit Mahabaleshwar temple followed with lunch (prasada) which is provided there. You can visit Om beach which is located close to Kudle beach, half moon beach, paradise island or you can visit Mirjan fort. This way you can relax and also visit tourist attractions in 2 days at Gokarna You can choose to stay in sea rock cafe or little paradise on Kudle beach For details you can read the trip attached.
Hey Laxmi, Places to be visited in two days itinerary for Gokarna: Day1 : Mahableshwara temple,Ganesh temple,Gokarna beach,Mirjan fort,Kudle beach Day2: Om beach,Half moon beach and paradise beach,Vibhooti falls. Hope this would help you.