I assume that if he really did found the (or a) navy, then it was to stop the Danes/Vikings from invading? If so, how would they have gone about it?
Alfred commonly gets his moniker as 'Father of the Royal Navy' for the structures he instituted as part of his wider, land-based military and bureaucratic reforms from the 870s onwards. Alongside new land defences designed to counteract Danish manouvre warfare and inhibit raiding tactics, English naval strategy prioritised blue- rather than brown-water engagements, which is to say that the English fleet sought to interdict Danish forces at sea before they could land, rather than the piecemeal response it had previously offered. Key to this were two new institutions: purpose-built warships, and semi-standing crews to man them. According to the Anglo-Saxon Chronicle, Alfred took an active role in the design of the English warships. These were intended to be dedicated fighting platforms compared to Danish ships which more typically favoured manoeuvrability and riverine capabilities:
They were almost twice as long as [the Danish ships], some had 60 oars, some more. They were both swifter and steadier and also higher than the others.
By virtue of their size and power, these ships were far more powerful in open sea warfare, but at the cost of manoeuvrability in shallower water. Their purpose was to interdict the Danes therefore before this became an issue, or at least to successfully divert and harass raiding fleets so that land-based forces could also respond. In 896, for example:
The King ordered a force to go thither (against a Danish force in the Solent) with nine of the new ships, and they blocked the estuary from the seaward end. Then the Danes went out against them with three ships, and three were on dry land further up the estuary; the men from them having gone up on land. Then the English captured two of those three ships at the entrance to the estuary, and killed the men, and the one ship escaped. On it also the men were killed except five. These got away because the ships of their opponents ran aground... That summer no fewer than twenty ships, men and all, perished along the South Coast.
The naval action itself would most likely have been a boarding action supported by archers and javelins from fighting platforms on the English ships. According to the Anglo-Saxon Chronicle, King Alfred personally lead a boarding action in at least one naval engagement. We know from will evidence that English warship crews could be equipped extensively with mail, helmets and swords, which would have given them a distinct edge against more lightly armoured raiding crews in particular.
The crews of the English ships were largely made up of Lithmen, a kind of maritime militia not too dissimilar from the fyrd militia instituted on land. Strickland has an excellent chapter on lithmen in Anglo-Norman Warfare which suggests that lithmen were experienced seamen and enjoyed a high status in the coastal communities from which they were recruited.