2002 Kia Rio car wont start

i was driving along the freeway when the car jumped kinda like it went out of gear or didn't get gas to it. It did it twice so I pulled off the freeway to the side and turned the car off. When I did that it wouldn't start back up. All I heard was clicking under the hood.