Also was Hitlers purpose in the Battle of Britain to bomb the Royal Navy until it's threat was gone?
First of all, the German invasion plans were extremely haphazard. There were no dedicated landing craft, and the Germans had begun collecting every possible barge, skiff, and tugboat they could from the German coast and rivers and assembling them on the French and Belgian coasts. These were not open water vessels- just look at the trouble the Allies had in 1944 with the weather, and they were in complete control of the air and the sea.
The German naval fleet was not strong at all compared to the British. If the Royal Navy had shown up in force to stop the landings, they would not have had much trouble. Keep in mind that an amphibious landing needs not only the first direct assault, but also continued resupplying and support from the sea for a while afterwards to consolidate. None of this could have occurred if the Royal Navy had anything to say about it.
Therefore, the Germans somehow needed to protect their invasion vessels from the Royal Navy. The German surface fleet was too small to be up to the task, and the responsibility therefore fell on the Luftwaffe. In order for the Luftaffe to perform this job, the Royal Air Force needed to be eliminated, giving the Germans complete control of the air, which led to the Battle of Britain. The later attacks on London later in the campaign were a diversion from the Luftwaffe's original purpose, which was attacking aircraft production and airfields to eliminate British fighters.
So, yes, the Royal Navy was indirectly the driving force behind the Battle of Britain, and the existence of the British navy was what prevented the German invasion. I personally don't think Operation Sealion would have gone well even if the Germans had beaten the RAF and pushed Fighter Command to the north. Like I said above, the plans were very haphazard and there was not much time left in the year when weather would be good enough to conduct landings. The German air force could be effective against surface ships, as seen a few years later in the Mediterranean, but the navy would still probably have been able to prevent the landings.
Yes the Royal Navy did deter Hitler from invading England but not the Royal Navy alone. The Battle of Britain was an aerial battle between the RAF and the Luftwaffe. Hitler's aim was to destroy the RAF and gain air superiority over England and the surrounding waters. That achieved, the Luftwaffe could then destroy the Royal Navy because England would have no air force to protect it.
The military historian Correlli Barnett has written:
When, on October 31, Admiral Forbes [of the Royal Navy] was directly asked by [Churchill] at a meeting of the War Cabinet Defence Committee whether an invasion was still possible, he answered that, "while we are predominant at sea and until Germany has defeated our fighter forces, invasion by sea is not a practical operation of war". This was also the firm opinion of the German navy and the German army. It is therefore fair to say that, in celebrating the Royal Air Force's victory, we must not forget that the Royal Navy made an equally decisive contribution to the thwarting of Hitler's invasion plans.
What is more, the Royal Air Force alone could not have devastated or disrupted Hitler's invasion armada on passage, because in 1940 its bombers lacked enough striking power. Only the Royal Navy's destroyers, backed by the Home Fleet's battleships and cruisers, could inflict the necessary damage. In any case, the German navy itself was utterly incapable of protecting the armada against such an attack, because it had suffered crippling losses during the Norwegian campaign in April-June 1940, with only two cruisers and 10 destroyers left fit for sea.
So, for German planners, the Royal Navy presented the supreme danger to Sealion - a danger that could only be neutralised by the Luftwaffe's bombers and dive bombers operating under conditions of air superiority. Once the Luftwaffe failed to win this superiority, it was (as Admiral Forbes pointed out) no longer a feasible operation of war to sail a cumbersome improvised armada across the Channel in the teeth of British naval gunfire and torpedoes.