What Is It Called When A Hacker Pretends To Be A Valid User On The System?

When a hacker attempts to attack a host via the Internet it is known as what type of attack?

.