Why does he show interest and then pull away

There is this man at my work that is very tender and gives me a lot of attention at times. Some other times he seems to avoid me and draws back. We flirt often, mostly I do but he doesn't seem to mind. Is he interested or isn't he? I´m so confused.