they were created in 1664, during the anglo-dutch war to help fight the dutch at sea.
they originally acted as boarding parties but werent known as teh royal marines then. i think they were known as the admirals regiment or something like that.
adn then they did not gain theyre commando status untill the second world war when churchill felt the need for a special force that specialised primarily working in small groups and conducting such things as amphiboius landings.
They were originally known as the Duke of York and Albany's Maritime regiment of Foot,
then they had a couple of other names,
then it was just marines,
then they got the title of "royal" in 1802,
By George the 3rd (maybe, not too sure).