Usually real friends are closer than pen friends, but that is not always true.
The main difference is what activities are available.
I might go out to a bar or a movie with a real friend. That is obviously impossible with a pen friend (or pen pal, as we say in the U.S.).
I could discuss a film with a pen friend, but I couldn't see it with them. I guess we could stream the film at the same time over the internet, but it still wouldn't be quite the same thing as watching it together in person.