The extension-ffi example showcases implementing a small function to add two tensors in https://github.com/pytorch/extension-ffi/blob/master/package/my_package/src/my_lib.c 31
What additional information would get you started?
You can look at how existing ops are implemented in C here:
https://github.com/pytorch/pytorch/tree/master/torch/lib/THNN/generic 40