"To drink" is 마시다, so it wouldn't randomly lose ㅅ and turn into 마있다. If it's a typo, you would think 마싰다 maybe. But nope :)
There is a different ending added depending on the last vowel in a verb or its ending (for irregular verbs).
The same pattern applies for the past tense as the present.
먹다 in the present tense is 먹어요. You add 어요 because the last (and only) vowel in 먹 is ㅓ.
So, 먹다 -> 먹 -> 먹+어요 -> 먹어요
가다 in the present tense is 가요. You add 아요 because the last (and only) vowel in 가 is ㅏ. Instead of repeating that sound and writing 가아요, it's written and pronounced as 가요.
So, 가다 -> 가 -> 가+아요 -> 가아요 -> 가요
마시다 in the present tense is 마셔요. You add 어요 because the last vowel in 마시 is ㅣ. Again, that combination of ㅣ+ㅓ is shortened to ㅕ.
So, 마시다 -> 마시 -> 마시+어요 -> 마시어요 -> 마셔요
하다 in the present tense is 해요. You add 여요 because it ends in 하. Again, 하+여 is shortened to 해.
So, 하다 -> 하 -> 하+여요 -> 하여요 -> 해요
You should understand how simple present tense conjugations work first.
For the simple present tense in the 요 form, you add 아/어/여요 depending on the word stem.
For the past tense, you add 았/었/였 depending on the word stem.
For the simple past tense in the 요 form, you add 았/었/였어요 depending on the word stem.
The way you determine which to end with is the same pattern for each tense.
먹다 -> 먹어요 -> 먹었어요
가다 -> 가요 -> 갔어요
마시다 -> 마셔요 -> 마셨어요
하다 -> 해요 -> 했어요
잡다 -> 잡아요 -> 잡았어요
읽다 -> 읽 -> (vowel is ㅣ so...) 읽+어요 -> 읽어요
읽다 -> 읽 -> (vowel is ㅣ so...) 읽+었어요 -> 읽었어요