How could one remove the underlining?

How could one remove the underlining:

Why is there sometimes an underling and sometimes not?