Yes, that's pretty much how you do it. Of course there is a bit of initialization/configuration that you have to do before it works - is that what you're asking about?
Generally, you have to enable the timer, set the clock dividers to a suitable range for your application, set it to output compare mode on the timer channel/pin of your choice, configure to set, clear, or toggle and write the appropriate value into the compare register for that channel/pin. Then when the counter rolls around to that value, it sets or clears or toggles that pin. If you want only one pulse, then you might want to enable an interrupt on that channel so you can disable the timer - otherwise it will keep setting or clearing or toggling every time the counter rolls around.
I'm not sure what you mean by 'mask and data registers'...