If you don't have a toothpick to check the cake to see if it's done you can use a fork or knife to stick into the center of the cake.
If the fork or knife comes out clean then the cake is done and ready to serve or eat after it cools down and you apply the frosting.
If you have an ice pick that is another way to check to see if the cake is done because all you need to do is insert the tooth pick, ice pick or other utensil into the cake and see if it's clean when you pull it out and if not then it needs to bake some more.
Most cakes are baked fully after 20 to 30 minutes but some cakes may take as long as 40 minutes depending on the size of the cake being baked.