Depending on your tablet, you may have the option to set the screen timeout to "never" under Settings > Display > Sleep.
If you do not have this option, you can enable Settings > Developer options > Stay awake. This will keep your tablet awake while it is charging. This could be useful if your tablet does not support the "never" screen timeout.
Note: If you don't see Developer options in Settings, it may be made available by going to to Settings > About > Software Information > Build number. Developer options should appear after tapping the build number several times.