I suppose this is meant to be in the 'What's the difference' section, but the answer is not that straight forward and so deserves a little bit more of an explanation.
Let's begin this by defining the verb to write.
Writing - in the form that we all know and understand - is when you want to produce words, letters or numbers on some form of surface. This can be anything but we'll assume that this is most likely to be paper. Then, to produce these words, letters, or numbers, you need something such as a pen or pencil to produce words, letters, or numbers on the surface of the paper.
Now typing - again, in the form that we know and understand - means to use a computer keyboard, typewriter or word processor in order to write.
Now that last point in the 'typing' definition is important. Here, it is used to specify a general method of producing letters and words onto a screen, and not by means of a pen or pencil.
But if we were to describe this as a specific physical method, that is, using our fingers, then we mean 'type'. Here are some examples that hopefully explain:
Fred wrote a letter to the company. Now before the days of computers, PCs and laptops, you either had to use a pen and a sheet of paper, or if you had one of these things - a typewriter - in order for Fred to communicate a message to the company.
Fred typed a letter to the company. Again, this would be done by means of the old-fashioned typewriter. The verb is very much connected with using your fingers to push down keys - with characters that are mounted on metal arms or typebars - in order to get letters stamped onto a piece of paper loaded into the machine.
And that's the key to the answer. The phrase to type a letter or typing a letter is very much associated with those manual machines in the past. That is, typewriters, or more recently, word processors, the name given to old computer programs or a computer which was used to produce printed documents.
But take the verb to type on its own, then it is certainly used not only with typewriters but also with modern keyboards, but with the meaning 'to have the ability to press letter keys at a reasonable speed and standard in order to produce a document'.
So, for example, forty years ago, only a small percentage of people had the ability to type, that is, produce letters at a good speed - after all, there were only typewriters. Today, virtually everyone can type at an acceptable pace because in 21st century Europe virtually everybody can use a home computer.
The lettering layout of the modern keyboard has remained unchanged since the QWERTY layout (that is, the layout of the keyboard designed for most western languages, and based on the first six-letter keys on the first row of letters) was devised and created in the early 1870s by Christopher Latham Sholes, an American newspaper editor and printer.
When the first machines were made available, they came out with a standard 'ABC' layout, but the metal arms of a typewriter jamming together on a regular basis as skilled typists soon became very adept - and very fast - at using the device, and the standard 'ABC' arrangement proved to be inefficient. The QWERTY lettering arrangement was designed to avoid certain keys that were hit often clashing and, in turn, jamming up the keyboard.
So in summary: You can say 'I wrote a letter/email' to mean 'I produced individual characters and numbers in a form that would be understood by the receiver', meaning this can done by means of a pen, typewriter or computer, laptop, tablet, phone or whatever. I've written several emails today. I wrote my entire thesis on mum's laptop.
But 'I can type' means 'I have the ability to use a keyboard to produce characters and numbers', which means both a typewriter and a computer: You need to type 'X' instead of 'Y' in that spreadsheet. I wish I could touch type on the Mac, not 'hunt and peck' with just two fingers.