In normal sentences, within a main clause, the verb always comes second, no matter what comes first. In a subordinate clause, it comes at the end. When the verb form includes an auxiliary verb, the auxiliary comes second and the participle at the end in a main clause and at the very end after the participle in a subordinate clause. Infinitives in an infinitive clause come at the end as well, but if you are asking a question without using a question word, the verb comes first.