Hi Elena,
Welcome to the forums

You can get a visa on arrival if you fly into Cambodia, and at some border crossings I believe, but you should check it out with whatever country you're from before getting to the border.
I didn't cross the border into Cambodia, but I did leave that way (had come from Sihanoukville) and didn't have any problems with queues or anything, but it might be different entering the country. Hopefully someone else can help with that, and how to get to Angkor Wat from the border (I came from Angkor Wat to Phomh Penh to Sihanoukville, staying at least one night in each)