Let's assume I have a valid casus belli, how do I exactly declare war? Do I just start marching my troops into his land and let him figure it out? Or do I send an envoy to tell him? And if I do, how long should I wait after the envoy left?
In the vast majority of cases a king wouldn't have an army that was capable of invading a neighbouring country, therefore he would have had to raise an army, the exact method of raising an army varied from place to place and from century to century. However as a general rule anything larger than a raiding party would require a large number of people to be informed. For example in Norman England a king would have to inform his barons so they can provide him with troops. The barons would then tell the knights, who would inform the men at arms and so on(the feudal system was more complicated than this). Due to a large number of people needing to be informed, any kingdom with a decent spy network (most countries didn't have good spy networks) would have heard of the military build up in a neighbour before an invasion could be launched.
In addition almost all good casus belli require announcing that you are claiming the title, therefore your neighbour would know that you wished to capture their territory. For example in the Norman conquest of England in 1066, Harold Godwinson knew that William the conqueror had made a claim on England and had raised an army on the southern coast of England in case of an invasion.
There was no requirement to issue a declaration of war that would be heard by the enemy. Declarations were typically made to your own soldiers and supporters instead of to the enemy. Envoys might be dispatched to deliver ultimatums and the like, for example during the War of the Bucket Bologna demanded the return of the bucket(and the gold originally inside it), therefore due to this and Bologna needing to inform its allies, Modena knew that Bologna was planning on fighting .During the war an envoy wouldn't be sent to announce an invasion.
Also the nature of war was very different in the medieval era compared to now, therefore modern ways of considering when wars start could be misleading. For example during the first 3 years of the 100 years war no large army crossed the channel. In wars typically a majority of the fighting involves raids along the border, while individual raids might be a surprise, a surprise invasion would have been rare.
In summary you would declare war by marching troops onto enemy land, your enemy would have(normally had) plenty of time to prepare for. You would not be expected to send an envoy to tell him you are at war, also you might have been at war for many years before the invasion anyway.
On a similar note: would casus belli be a large factor in declaring a war? To narrow it down, the 11th-12th century is the time period that I'm referring to. I understand the Crusades would be a justification for meddling in the Middle East, but other than that, was it (a CB) ever needed?