Getting the ID of the current user in custom code

I am using custom code in approval form. How do I get the ID of the current user. This will help me with the filtering to display user-specific data.