This issue can occur anywhere where the rich text editor is used - that's the feature with all the toolbar buttons for bold, italics, link, etc. You may run into this issue using the Text Module when creating a website page, posting news or events, or creating an assignment.
When this happens, just delete the entire word, words, or image you've been trying to use as a link, along with the surrounding spaces, and start again.
Sometimes the rich text editor will create a link but does not include the specified URL. So, no matter how many times you try, you can never create a working link. This is not something you can see unless you look at the source code.
If this doesn't do the trick, it could be that you are editing your website using a browser we don't fully support. Chrome is the only browser we fully support for editing.